-
Notifications
You must be signed in to change notification settings - Fork 177
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
introduce Lwt_io.establish_server' #346
Conversation
Exactly like Lwt_io.establish_server but allows the callback to access the client's socket.
Looks pretty reasonable.
|
I think this is neat, but the name is not that good ( |
Yeah, definitely. I'll let Anton adjust the names |
True. It does seem that we should still pass the address directly to the callback. Maybe we should pass three argument then (address, fd, and pair of channels), or maybe the right thing to do is instead to add a Another option is to pass the address and fd, and if the user wants to create channels, the user can do so from the fd. This is actually what I originally thought you meant to do in #323. The cost here is that Lwt_io currently performs some non-trivial These issues make me think that Lwt_io is headed for at least a partial redesign. I guess we can accept this PR in whatever currently-reasonable form, and not block it on any such bigger work. I'm actually now leaning towards only adding the address argument, as in the first commit, because I think we want to add that no matter what. What to do about the fd seems, to me, like some kind of bigger problem, which maybe it is not necessary or convenient to deal with right now. Additional opinions are welcome :) |
3ab6e71
to
1a084ae
Compare
@aantron I got rid of the last commit |
1a084ae
to
814328b
Compare
Also write a new draft of the Lwt_io.establish_server docs. Related #346.
So, I went with the name |
Also write a new draft of the Lwt_io.establish_server docs. Related #346.
Exactly like Lwt_io.establish_server but allows the callback to access
the client's socket.
Fix #323