-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add functions that accept socket options #6
Add functions that accept socket options #6
Conversation
04b588c
to
333203f
Compare
openServerSocketWithOptions
and openClientSocketWithOptions
2948d05
to
755ea82
Compare
I guess an alternative approach would be to generalize |
755ea82
to
e02d9de
Compare
I decided it was cleaner to introduce |
Adds: - `openServerSocketWithOptions` - `openClientSocketWithOptions` - `runTCPServerWithSocketOptions` x2, one in `Timeout` one in `TCP` - `runTCPClientWithSocket` - `runTCPClientWithSocketOptions` Bump version to 0.3.2
e02d9de
to
4ffdc61
Compare
@kazu-yamamoto Sorry for the churn with the various pushes to this PR, but we think this is ready now :) Context: it turns out to be really important for us to be able to set By the way, it might be useful to enable |
I'm actually not sure if all functions that should be exported have been exported, I think they have not. Let me check and maybe fix, will report back soon. |
Superseded by #8. |
We have run into a situation where it would be nice to be able to use
openServerSocket
/runTCPClient
and set some socket options on the sockets before the bind/connect occurs. This PR adds generalizations of the existing functions which set given options on the sockets, and reimplements the originals in terms of the generalizations (e.g.openServerSocket <=> openServerSocketWithOptions []
).Bumps version to 0.3.2. Thanks!