-
Notifications
You must be signed in to change notification settings - Fork 11
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 Mirage_flow.shutdown: flow -> [ read | write | read_write ] -> unit Lwt.t #48
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hannesm
changed the title
Add Mirage_flow.shutdown: flow -> [
Add `Sep 2, 2022
read |
write | `read_write ] -> unit Lwt.t Mirage_flow.shutdown: flow -> [
read | write |
read_write ] -> unit Lwt.t ``
hannesm
changed the title
Add `
Add Mirage_flow.shutdown: flow -> [ read | write | read_write ] -> unit Lwt.t
Sep 2, 2022
Mirage_flow.shutdown: flow -> [
read | write |
read_write ] -> unit Lwt.t ``
djs55
approved these changes
Sep 16, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, and thanks @hannesm for working on this!
I came back here, and since Dave likes the API, I'll merge and release. |
This was referenced Dec 17, 2023
hannesm
added a commit
to hannesm/opam-repository
that referenced
this pull request
Dec 17, 2023
…rs (4.0.0) CHANGES: - Add ``shutdown : flow -> [ `read | `write | `read_write ] -> unit Lwt.t`` (@djs55 @hannesm mirage/mirage-flow#16 mirage/mirage-flow#18 mirage/mirage-flow#48) - Remove SHUTDOWNABLE signature (@djs55 mirage/mirage-flow#17, rebased into mirage/mirage-flow#48)
This was referenced Dec 17, 2023
hannesm
added a commit
to hannesm/opam-repository
that referenced
this pull request
Dec 19, 2023
…rs (4.0.0) CHANGES: - Redefine `close` semantics, which no longer is a `` shutdown `read_write `` (mirage/mirage-flow#49 @hannesm) - Add ``shutdown : flow -> [ `read | `write | `read_write ] -> unit Lwt.t`` (@djs55 @hannesm mirage/mirage-flow#16 mirage/mirage-flow#18 mirage/mirage-flow#48) - Remove SHUTDOWNABLE signature (@djs55 mirage/mirage-flow#17, rebased into mirage/mirage-flow#48)
hannesm
added a commit
to hannesm/opam-repository
that referenced
this pull request
Dec 19, 2023
…rs (4.0.0) CHANGES: - Redefine `close` semantics, which no longer is a `` shutdown `read_write `` (mirage/mirage-flow#49 @hannesm) - Add ``shutdown : flow -> [ `read | `write | `read_write ] -> unit Lwt.t`` (@djs55 @hannesm mirage/mirage-flow#16 mirage/mirage-flow#18 mirage/mirage-flow#48) - Remove SHUTDOWNABLE signature (@djs55 mirage/mirage-flow#17, rebased into mirage/mirage-flow#48)
nberth
pushed a commit
to nberth/opam-repository
that referenced
this pull request
Jun 18, 2024
…rs (4.0.0) CHANGES: - Redefine `close` semantics, which no longer is a `` shutdown `read_write `` (mirage/mirage-flow#49 @hannesm) - Add ``shutdown : flow -> [ `read | `write | `read_write ] -> unit Lwt.t`` (@djs55 @hannesm mirage/mirage-flow#16 mirage/mirage-flow#18 mirage/mirage-flow#48) - Remove SHUTDOWNABLE signature (@djs55 mirage/mirage-flow#17, rebased into mirage/mirage-flow#48)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Also removes SHUTDOWNABLE signature (#17)
Superseeds #18 (which proposed disconnect)
This reason for this is multi-fold, a recent issue is about HTTP/2 and how to shutdown the write direction only. Also, this interface is present in Unix.
//cc @djs55 (who mentioned that
shutdown `read
is not used much: I guess we could use that to save some space in the TCP stack (the receive buffer no longer needs to be present)//cc @dinosaure who encountered the HTTP2 issue
//cc @talex5 who in mirleft/ocaml-tls#451 mentioned the lack of such functionality (and tls_lwt is close to the Mirage_flow.S signature, tls_mirage is implementing it)
And once more //cc @djs55 who has been proposing this since quite some time. I hope this PR suits you well (I've not much experience with Mirage_flow_unix and Mirage_flow_combinators, and would be keen to know whether the changes are reasonable).
If we can agree on this change, we can quickly revise the ecosystem to conform with the new interface. It'd be interesting whether we should as well revise
read
(as poposed in #46) to (if I understand correctly) get the buffer passed instead of allocating the underlying buffer (and thus clean up ownership methodology) //cc @haesbaert who may be interested as well.