Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

port default option #150

Open
reqshark opened this issue Feb 23, 2016 · 5 comments
Open

port default option #150

reqshark opened this issue Feb 23, 2016 · 5 comments

Comments

@reqshark
Copy link
Collaborator

do we really need another socket option? for sure.

often I find myself using the same TCP port across machines.. thinking it might be nice to specify a socket's default port as part of its initial configuration like maybe:

const pub = require('nanomsg').socket( 'pub', {
  port: 5555,
  tcpnodelay: true,
})

/* now connection argument gets simpler */

pub.connect('tcp://192.168.204.129')
pub.connect('tcp://192.168.204.130')
pub.connect('tcp://192.168.204.131')
pub.connect('tcp://192.168.204.132')
pub.connect('tcp://192.168.204.133')
@yoshuawuyts
Copy link

I think this is reasonable.

@reqshark
Copy link
Collaborator Author

cool i'll take that as a plus one

@reqshark
Copy link
Collaborator Author

@yoshuawuyts go for it if u want to PR it, otherwise hopefully I'll have time this weekend to take a swing myself and muster something up here and could probably use your review...

these things all need to be implemented consistently.. i.e. a sockopt also means socket.port(1984)

also i want to address @nickdesaulniers' point in #52, the essence of which seems to be: while testing libnanomsg operational return values confirms library interoperability across calls, nothing else is tested.

@nickdesaulniers
Copy link
Owner

👍

@yoshuawuyts
Copy link

@reqshark happy to review, won't have time to PR it before this weekend

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants