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
Writing a simple "request-response" protocol (where each request opens a new substream) is way too complicated at the moment, despite the OneShotHandler.
Instead, in my opinion there should be some sort of helper structs.
Writing a simple "request-response" protocol (where each request opens a new substream) is way too complicated at the moment, despite the
OneShotHandler
.Instead, in my opinion there should be some sort of helper structs.
Here is an API sketch:
Thanks to this, it would be possible to write just an implementation of
OutboundUpgrade
andInboundUpgrade
.This could also be combined with
libp2p_core::upgrade::from_fn
to create protocols in one line of code, provided Rust gets existential types.Related: #1530
The text was updated successfully, but these errors were encountered: