Expand description
memberlist
’s Transport
layer based on TCP and UDP.
Modules§
- error
- Errors for the net transport.
- futures
- Abstractions for asynchronous programming.
- resolver
- Re-exports
nodecraft
’s address resolver. - stream_
layer - Abstract the
StremLayer
forNetTransport
. - tests
test
- Exports unit tests.
- unimplemented
- An unimplemented transport for testing purposes only.
Structs§
- CIDRs
Policy - Classless Inter-Domain Routing (CIDR) policy.
- Domain
- A type which encapsulates a string that is a syntactically domain name.
- Domain
Ref - A reference to a
Domain
that is guaranteed to be valid. - Host
Addr - A host address which supports both
domain:port
and socket address. - Host
Addr Ref - A host address which supports both
domain:port
and socket address. - Label
- General approach is to prefix all packets and streams with the same structure:
- NetTransport
- The net transport based on TCP/TLS and UDP
- NetTransport
Options - Used to configure a net transport.
- Node
- Node is consist of id and address, which can be used as a identifier in a distributed system.
- NodeId
- A unique string identifying a server for all time. The maximum length of an id is 512 bytes.
- Node
IdRef - A unique string identifying a server for all time. The maximum length of an id is 512 bytes.
- Packet
- The packet receives from the unreliable connection.
- Packet
Producer - A producer for packets.
- Packet
Subscriber - A subscriber for packets.
- Parse
Domain Error - The provided input could not be parsed because it is not a syntactically-valid DNS Domain.
- Recv
Error - An error returned from
Receiver::recv()
. - Send
Error - An error returned from
Sender::send()
. - Stream
Producer - A producer for promised streams.
- Stream
Subscriber - A subscriber for promised streams.
Enums§
- Label
Error - Label error.
- Parse
Host Addr Error - An error which can be returned when parsing a
HostAddr
. - Parse
Node IdError - Errors that can occur when transforming an
NodeId
. - TryRecv
Error - An error returned from
Receiver::try_recv()
. - TrySend
Error - An error returned from
Sender::try_send()
.
Traits§
- Address
- Address abstraction for distributed systems
- Address
Resolver - Used to resolve a [
SocketAddr
] from a node address in async style. - Cheap
Clone - Things that are fast to clone in the context of an application.
- Connection
- The connection
- Id
- Id abstraction for distributed systems
- Transport
- Transport is used to abstract over communicating with other peers. The packet interface is assumed to be best-effort and the stream interface is assumed to be reliable.
- Transport
Error - An error for the transport layer.
Functions§
- packet_
stream - Returns producer and subscriber for packet.
- promised_
stream - Returns producer and subscriber for promised stream.
Type Aliases§
- Async
StdNet Transport NetTransport
based onasync-std
.- Smol
NetTransport NetTransport
based onsmol
.- Tokio
NetTransport NetTransport
based ontokio
.