You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 19, 2022. It is now read-only.
Another concern here is that we need to signal the role to the multiplexer, at least in the case of yamux.
We might have to change the interface to return the role, or maybe we should change the transport upgrader to select based on the peer IDs. @Stebalien thoughts?
@vyzo I can see two ways to do implement the signaling:
Add a IsClient() bool function the SecureConn interface, or
change the function signature of SecureOutbound to SecureOutbound(context.Context, net.Conn, peer.ID) (SecureConn, bool /*is client */, error).
I think that 2. would be the cleaner solution. Option 1. would also add IsClient() to all interfaces that build on top of SecureConn, and it's not clear if that function actually makes sense on those interfaces. For example, a stream multiplexer might decide to initialize itself in client mode on the server side, and in server mode on the client side.
This file contains hidden or 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
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
None yet
2 participants
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.
As described in libp2p/specs#227 (comment).