Skip to content
This repository has been archived by the owner. It is now read-only.

Add localPort parameter on net.connect() #7092

Closed
50ndr33 opened this issue Feb 10, 2014 · 4 comments
Closed

Add localPort parameter on net.connect() #7092

50ndr33 opened this issue Feb 10, 2014 · 4 comments
Labels
Milestone

Comments

@50ndr33
Copy link

@50ndr33 50ndr33 commented Feb 10, 2014

Being able to decide which local port should be used when opening a TCP socket is essential to do for example TCP hole punching. Please add this feature.

@tjfontaine
Copy link

@tjfontaine tjfontaine commented Feb 10, 2014

I was going to add this myself, but if you can get a PR done before me that'd be great

Loading

@tjfontaine tjfontaine added this to the v0.12 milestone Feb 10, 2014
@tjfontaine tjfontaine added the net label Feb 10, 2014
@tjfontaine tjfontaine self-assigned this Feb 10, 2014
@50ndr33
Copy link
Author

@50ndr33 50ndr33 commented Feb 11, 2014

I have very little experience in C. If you know the API better, you should do it, as it requires a bit editing.

Loading

tjfontaine added a commit to tjfontaine/node that referenced this issue Feb 18, 2014
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 nodejs#7092
tjfontaine added a commit to tjfontaine/node that referenced this issue Feb 18, 2014
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 nodejs#7092
@50ndr33
Copy link
Author

@50ndr33 50ndr33 commented Feb 18, 2014

@tjfontaine did you just update it?

Loading

@indutny
Copy link
Member

@indutny indutny commented Feb 18, 2014

@50ndr33 I guess it is resolved now.

Loading

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants