This repository has been archived by the owner on Sep 6, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 75
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
vyzo
approved these changes
Aug 27, 2020
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.
At last! It will be quite an endeavor to update our code for this however.
I've already written the patch for yamux and I'm currently writing the patch for mplex. It's actually pretty easy to update code using streams, because pretty much all of it either:
|
raulk
approved these changes
Aug 27, 2020
Stebalien
added a commit
to libp2p/go-mplex
that referenced
this pull request
Aug 28, 2020
Close now closes the stream in both directions while CloseRead discards inbound bytes and CloseWrite sends an EOF. This matches the user's expectation where Close actually closes the stream. part of libp2p/go-libp2p-core#166
This changes the behavior of `Close` to behave as one would expect: it closes the stream. The new methods, CloseWrite/CloseRead allow for closing the stream in a single direction. Note: This _does not_ implement CancelWrite/CancelRead as our stream muxer _protocols_ don't support that. fixes #9
FullClose and AwaitEOF were introduced to work around the fact that calling Close on a stream only closed the write half. All users must adapt their code to the new interfaces, so this change is intentionally breaking.
Stebalien
force-pushed
the
feat/rw-close2
branch
from
August 28, 2020 00:30
307bbdc
to
306f1b0
Compare
Stebalien
added a commit
to libp2p/go-libp2p-quic-transport
that referenced
this pull request
Aug 28, 2020
This: * Changes `Close` to behave like the unix `close` (sends an EOF, ignores future inbound data). * Adds a `CloseWrite` to replace the current `Close`. * Adds a `CloseRead` to close the read side, while leaving the write side open. See libp2p/go-libp2p-core#166.
Stebalien
added a commit
to libp2p/go-mplex
that referenced
this pull request
Aug 28, 2020
Close now closes the stream in both directions while CloseRead discards inbound bytes and CloseWrite sends an EOF. This matches the user's expectation where Close actually closes the stream. part of libp2p/go-libp2p-core#166
Stebalien
added a commit
to libp2p/go-mplex
that referenced
this pull request
Aug 28, 2020
Close now closes the stream in both directions while CloseRead discards inbound bytes and CloseWrite sends an EOF. This matches the user's expectation where Close actually closes the stream. part of libp2p/go-libp2p-core#166
The test failures here are just warnings about breaking changes. All muxer PRs are ready to review. |
Stebalien
added a commit
to libp2p/go-libp2p-quic-transport
that referenced
this pull request
Sep 2, 2020
This: * Changes `Close` to behave like the unix `close` (sends an EOF, ignores future inbound data). * Adds a `CloseWrite` to replace the current `Close`. * Adds a `CloseRead` to close the read side, while leaving the write side open. See libp2p/go-libp2p-core#166.
moul-bot
pushed a commit
to berty/berty
that referenced
this pull request
Nov 13, 2020
Signed-off-by: Manfred Touron <[email protected]>
moul-bot
pushed a commit
to berty/berty
that referenced
this pull request
Nov 13, 2020
Signed-off-by: Manfred Touron <[email protected]>
marten-seemann
pushed a commit
to libp2p/go-libp2p
that referenced
this pull request
Apr 22, 2022
This: * Changes `Close` to behave like the unix `close` (sends an EOF, ignores future inbound data). * Adds a `CloseWrite` to replace the current `Close`. * Adds a `CloseRead` to close the read side, while leaving the write side open. See libp2p/go-libp2p-core#166.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This changes the behavior of
Close
to behave as one would expect: it closesthe stream. The new methods, CloseWrite/CloseRead allow for closing the stream in
a single direction.
Note: This does not implement CancelWrite/CancelRead as our stream muxer
protocols don't support that.
fixes #9
followup from #115, which is a followup from #10.