-
Notifications
You must be signed in to change notification settings - Fork 7
expose SetDeadline
methods on streams
#10
Comments
This may be a libp2p decision. Maybe libp2p should use an abstraction like
|
cc @diasdavid
|
If adopted, it should be part of https://github.com/libp2p/interface-stream-muxer and set as an expectation of an implementation. I'm not sure if I understand what is setting a deadline though, checked the code and I see that option, but when is it used? |
@diasdavid its a common socket options, check the docs here: https://golang.org/pkg/net/#Conn |
@whyrusleeping got it, when do you use it? |
@diasdavid it's effectively a timeout, when asking to send, listen, dial, etc, but only for a given amount of time. @whyrusleeping i would much prefer to use a context abstraction in libp2p, across languages. contexts can give you deadlines, and cancellables, etc. |
While I mostly agree with @jbenet last comment, this might be the only thing breaking go-libp2p/master:
And it has been recently bubbled to the Stream interface anyway https://godoc.org/github.com/libp2p/go-libp2p-net#Stream If I attempt a fix, does it stand a chance to be accepted? Or are going to go down the road of undoing libp2p/go-libp2p-net@f657968 (go-peerstream, go-libp2p-swarm at least are affected) |
@whyrusleeping I see some work being done here too that would need to be consolidated: https://github.com/whyrusleeping/go-stream-muxer/commits/master |
I'm trying to run the tests in this project and this is my adventure-log from it:
In the end, seems |
@victorbjelkholm try skipping muxado (not important for now). |
I believe this is done. @whyrusleeping? |
Yeah, I believe so
…On Wed, Aug 30, 2017, 7:13 PM Steven Allen ***@***.***> wrote:
I believe this is done. @whyrusleeping <https://github.com/whyrusleeping>?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#10 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABL4HJIKtDJ9a7CXBfDQvbJVGGg__7tIks5sdhbIgaJpZM4Jn_r_>
.
|
Most (if not all) of the stream multiplexers we have already have support for these methods on their streams. We should expose that down to the users
The text was updated successfully, but these errors were encountered: