[−][src]Module libp2p_core::protocols_handler
Once we are connected to a node, a protocols handler handles one or more specific protocols on this connection.
This includes: how to handle incoming substreams, which protocols are supported, when to open a new outbound substream, and so on.
Each implementation of the ProtocolsHandler trait handles one or more specific protocols.
Two ProtocolsHandlers can be combined together with the select() method in order to build
a ProtocolsHandler that combines both. This can be repeated multiple times in order to create
a handler that handles all the protocols that you wish.
Note: A
ProtocolsHandlerhandles one or more protocols in relation to a specific connection with a remote. In order to handle a protocol that requires knowledge of the network as a whole, see theNetworkBehaviourtrait.
Structs
| DummyProtocolsHandler | Implementation of |
| Fuse | Wrapper around a protocol handler and ignores all further method calls once it has shut down. |
| IntoProtocolsHandlerSelect | Implementation of |
| MapInEvent | Wrapper around a protocol handler that turns the input event into something else. |
| MapOutEvent | Wrapper around a protocol handler that turns the output event into something else. |
| NodeHandlerWrapper | Wraps around an implementation of |
| NodeHandlerWrapperBuilder | Prototype for a |
| OneShotHandler | Implementation of |
| ProtocolsHandlerSelect | Implementation of |
Enums
| KeepAlive | How long the connection should be kept alive. |
| ProtocolsHandlerEvent | Event produced by a handler. |
| ProtocolsHandlerUpgrErr | Error that can happen on an outbound substream opening attempt. |
Traits
| IntoProtocolsHandler | Prototype for a |
| ProtocolsHandler | Handler for a set of protocols for a specific connection with a remote. |