-
Notifications
You must be signed in to change notification settings - Fork 37
Treat transient connections as opt-in when opening new streams #236
Conversation
We still need the code to mark limited Relay connections as Transient. How and where in the code do you plan to do that without leaking the idea of limited Relays to the Swarm ? |
The relay dialer/listener constructs the Conn object, so it can mark itself when it knows it's transient. |
retract that, the swarm creates the stat object -- we need a mechanism to pass stuff from the transport all the way up to the swarm. |
added threading of stat if available from the transport conn. |
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. Need to propagate & update deps before merge.
94302e6
to
5c3c0a0
Compare
Should I go ahead and merge this ? |
waiting for travis, I will merge and cut release. |
This adds support for transient connections with opt-in semantics; when the best connection to a peer is transient, then only open a stream if the user is prepared to deal with it and has specified the relevant context option.
Rationale: many protocols may not be prepared to deal with transient connections; this makes it explicit opt-in to protect them and also eliminate interference with connection upgrade attempts.
depends on libp2p/go-libp2p-core#175
TODO