-
Notifications
You must be signed in to change notification settings - Fork 7.3k
feature request: bind a special local address in net.connect (as a tcp client) #2285
Comments
Really? Did you ever try? |
Btw, I suggest you to learn some basics of Github markup, looks var net = require("net");
net.createConnection(80, "google.com", function() {
console.log("hi there!");
}) |
@bobrik, please notice I mention here is "bind local address", not "connect remote google's 80 port" |
Yes, it's not possible to bind a client socket to a local address right now. It's high on my 'things to do when I have an hour to kill' list. |
Hey you closed the issue but i don't see my or any patch which is related to this issue, has been integrated into the node codebase. cheers meno |
Nothing so far. #987 doesn't apply to v0.6, that's why I closed it. I want to implement it in the near future. |
When will the "near future" give me the local bind feature? cheers meno |
When either a) one of the maintainers finds the time to implement it, or b) someone submits a patch. |
i offert to make the patch. But i'am not willing to do the work and later on to get rejected again. cheers meno |
Submit a high-quality patch and there's a good chance of it getting landed. Check out the Contributing wiki page. |
node 0.7.6 net, http, https: add localAddress option (Dmitry Nizovtsev) |
tcp server.listen support bind(), but tcp client has no such feature.
in net.js
exports.connect = exports.createConnection = function(port /* [host], [cb] */) {
var s;
if (isPipeName(port)) {
s = new Socket({ handle: createPipe() });
} else {
s = new Socket();
}
return s.connect(port, arguments[1], arguments[2]);
};
The text was updated successfully, but these errors were encountered: