Module chmux

Source
Expand description

Low-level channel multiplexer.

Multiplexes multiple binary channels over a single binary channel (anything that implements Sink and Stream). A connection is established by calling ChMux::new.

You probably do not want to use this module directly. Instead use methods from Connect to establish a connection over a physical transport and work with high-level remote channels.

§Protocol version compatibility

Two endpoints can only communicate if they have the same protocol version. A change in protocol version will be accompanied by an increase of the major version number of the Remoc crate.

Structs§

AnyStorage
Stores arbitrary data indexed by automatically generated keys.
Cfg
Channel multiplexer configuration.
ChMux
Channel multiplexer.
ChunkSender
Sends chunks of a message to the remote endpoint.
Client
Multiplexer client.
Closed
This future resolves when the remote endpoint has closed its receiver.
Connect
An outstanding connection request.
DataBuf
A buffer containing received data.
Listener
Multiplexer listener.
ListenerStream
A stream accepting connections and returning senders and receivers.
PortAllocator
Local port number allocator.
PortNumber
An allocated local port number.
PortReq
A port connection request by the local endpoint.
Receiver
Receives byte data over a channel.
ReceiverStream
A stream receiving byte data over a channel.
Request
A connection request by the remote endpoint.
Sender
Sends byte data over a channel.
SenderSink
A sink sending byte data over a channel.

Enums§

ChMuxError
Channel multiplexer error.
ConnectError
An error occurred during connecting to a remote service.
ForwardError
An error occurred during forwarding of a message.
ListenerError
An multiplexer listener error.
PortsExhausted
Behavior when ports are exhausted and a connect is requested.
Received
Received data or port requests.
RecvAnyError
An error occurred during receiving a message.
RecvChunkError
An error occurred during receiving chunks of a message.
RecvError
An error occurred during receiving a data message.
SendError
An error occurred during sending of a message.
TrySendError
An error occurred during sending of a message.

Constants§

PROTOCOL_VERSION
Channel multiplexer protocol version.

Type Aliases§

AnyBox
Box containing any value that is Send, Sync and static.
AnyEntry
An entry in AnyStorage.