net: add localPort to connect options
authorTimothy J Fontaine <tjfontaine@gmail.com>
Tue, 18 Feb 2014 01:30:12 +0000 (17:30 -0800)
committerFedor Indutny <fedor.indutny@gmail.com>
Tue, 18 Feb 2014 11:55:04 +0000 (15:55 +0400)
commit59baab277691dcc7d788724020084414b96de22c
tree849d4d50a5c0842a69f7b062b7e0cfbecdbdf0de
parenta226be4f76b73f651404803777e4ecdcbb5ac4ff
net: add localPort to connect options

Expose localPort for binding to a specific port for outbound
connections.

If localAddress is not specified '0.0.0.0' is used for ip4 and '::'
for ip6 connections.

Fixes #7092
doc/api/net.markdown
lib/net.js
test/simple/test-net-localerror.js [new file with mode: 0644]
test/simple/test-net-localport.js [new file with mode: 0644]