Crate distant_net
source · [−]Re-exports
Macros
Creates a new struct around a UntypedTransport
that routes incoming
and outgoing messages to different transports, enabling the ability to transform a singular
transport into multiple typed transports that can be combined with Client
and Server
to mix having a variety of clients and servers available on the
same underlying UntypedTransport
.
Structs
Represents a single question in a challenge
Server that handles authentication
Represents a sender of requests tied to a session, holding onto a weak reference of
mailboxes to relay responses, meaning that once the [Session
] is closed or dropped,
any sent request will no longer be able to receive responses
Represents a client that can be used to send requests & receive responses from a server
Represents [TypedTransport
] of data across the network using frames in order to support
typed messages instead of arbitrary bytes being sent across the wire.
Represents a transport of inbound data from the network using frames in order to support typed messages instead of arbitrary bytes being sent across the wire.
Represents a transport of outbound data to the network using frames in order to support typed messages instead of arbitrary bytes being sent across the wire.
Represents a generic reference to a server
Utility to perform a handshake
Represents a RawTransport
comprised of two inmemory channels
Read portion of an inmemory channel
Write portion of an inmemory channel
Represents a destination for responses
Represents a Listener
that uses an mpsc::Receiver
to
accept new connections
Represents a TypedTransport
of data across the network that uses mpsc::Sender
and
mpsc::Receiver
underneath.
Represents a Listener
that only has a single connection
Represents a codec that just ships messages back and forth with no encryption or authentication
Represents some range of ports
Represents a wrapper around EncodedPoint
, and exists to
fix an issue with serde
deserialization failing when
directly serializing the EncodedPoint
type
Represents a reply where all sends are queued up but not sent until after the flush method is called. This reply supports injecting at the front of the queue in order to support sending messages but ensuring that some specific message is sent out first
Represents a request to send
Represents a response received related to some request
Friendly wrapper around a 32-byte array representing a salt
Represents a secret key used with transport encryption and authentication
Represents an individual connection on the server
Represents contextual information for working with an inbound request
Utility to send ad-hoc replies from the server back through the connection
Contains all top-level state for the server
Represents a Listener
for incoming connections over TCP
Reference to a TCP server instance
Represents a RawTransport
that leverages a TCP stream
Represents a Listener
for incoming connections over a Unix socket
Reference to a unix socket server instance
Represents a RawTransport
that leverages a Unix socket
Represents the codec to encode & decode data while also encrypting/decrypting it
Enums
Represents authentication messages that can be sent over the wire
Represents the type of error encountered during authentication
Represents authentication messages that act as initiators such as providing a challenge, verifying information, presenting information, or highlighting an error
Represents authentication messages that are responses to auth requests such as answers to challenges or verifying information
Represents the type of verification being requested
Traits
Represents abstraction of a codec that implements specific encoder and decoder for distant
Interface to split something into writing and reading halves
Represents a type that has a listen interface for receiving raw streams
Interface representing a transport of raw bytes into and out of the system
Interface representing a transport of raw bytes into the system
Interface representing a transport of raw bytes out of the system
Interface to send a reply to some request
Interface for a general-purpose server that receives requests to handle
Extension trait to provide a reference implementation of starting a server
that will listen for new connections (exposed as TypedAsyncWrite
and TypedAsyncRead
)
and process them using the Server
implementation
Interface to engage with a server instance
Extension trait to provide a reference implementation of starting a TCP server
that will listen for new connections and process them using the Server
implementation
Interface to read some structured data asynchronously
Interface to write some structured data asynchronously
Interface representing a transport of typed data into and out of the system
Extension trait to provide a reference implementation of starting a Unix socket server
that will listen for new connections and process them using the Server
implementation
Interface representing a transport that uses serde
to serialize and deserialize data
as it is sent and received
Interface representing a transport’s read half that uses serde
to deserialize data as it is
received
Interface representing a transport’s write half that uses serde
to serialize data as it is
sent
Type Definitions
Type signature for a dynamic on_challenge function
Type signature for a dynamic on_error function
Type signature for a dynamic on_info function
Type signature for a dynamic on_verify function
Id associated with an active connection
Represents an AuthServer
where all handlers are stored on the heap
Represents a generic id type
Represents a 32-byte secret key
32-byte key shared by handshake