Skip to content

Commit 15b6950

Browse files
authored
Added localAddress to connect options
1 parent a0a0507 commit 15b6950

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/connection.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,14 @@ var Connection = function(config) {
6060

6161
util.inherits(Connection, EventEmitter);
6262

63-
Connection.prototype.connect = function(port, host) {
63+
Connection.prototype.connect = function(port, host, localAddress) {
6464

6565
if(this.stream.readyState === 'closed') {
66-
this.stream.connect(port, host);
66+
this.stream.connect({
67+
port: port,
68+
host: host,
69+
localAddress: localAddress
70+
});
6771
} else if(this.stream.readyState == 'open') {
6872
this.emit('connect');
6973
}

0 commit comments

Comments
 (0)