net_socket.remotePort

socket.remotePort The numeric representation of the remote port. For example, 80 or 21.

net_socket.setKeepAlive()

socket.setKeepAlive([enable][, initialDelay]) Enable/disable keep-alive functionality, and optionally set the initial delay before the first keepalive probe is sent on an idle socket. enable defaults to false. Set initialDelay (in milliseconds) to set the delay between the last data packet received and the first keepalive probe. Setting 0 for initialDelay will leave the value unchanged from the default (or previous) setting. Defaults to 0. Returns socket.

net_socket.setEncoding()

socket.setEncoding([encoding]) Set the encoding for the socket as a Readable Stream. See stream.setEncoding() for more information.

net_socket.setNoDelay()

socket.setNoDelay([noDelay]) Disables the Nagle algorithm. By default TCP connections use the Nagle algorithm, they buffer data before sending it off. Setting true for noDelay will immediately fire off data each time socket.write() is called. noDelay defaults to true. Returns socket.

net_socket.localPort

socket.localPort The numeric representation of the local port. For example, 80 or 21.

net_socket.ref()

socket.ref() Opposite of unref, calling ref on a previously unrefd socket will not let the program exit if it's the only socket left (the default behavior). If the socket is refd calling ref again will have no effect. Returns socket.

net_socket.remoteFamily

socket.remoteFamily The string representation of the remote IP family. 'IPv4' or 'IPv6'.

net_socket.pause()

socket.pause() Pauses the reading of data. That is, 'data' events will not be emitted. Useful to throttle back an upload.

net_socket.remoteAddress

socket.remoteAddress The string representation of the remote IP address. For example, '74.125.127.100' or '2001:4860:a005::68'. Value may be undefined if the socket is destroyed (for example, if the client disconnected).

net_socket.end()

socket.end([data][, encoding]) Half-closes the socket. i.e., it sends a FIN packet. It is possible the server will still send some data. If data is specified, it is equivalent to calling socket.write(data, encoding) followed by socket.end().