net-connect
Make tcp connections with a convenient api.
Example
var connect = ; // portvar con = ; // ":port"var con = ; // "host:port"var con = ; // { host, port }var con = ; // { address, port }// this is what you get from server.address()var con = ;
Installation
$ npm install net-connect
API
connect(obj[, listener])
Create a tcp connection to the address specified by obj
.
Optionally pass a listener
fn to be called when the connection has been
established.
connect.parse(obj)
Parse obj
and return a { host, port }
object. This is used internally
by connect()
.
License
MIT