Expand description
§SwimOS Transport Layer
This crate provides the transport layer for SwimOS (bidirectional web-socket connections over TCP sockets). It consists of:
- An abstraction over DNS to allow for the resolution of remote hosts of Swim agents.
- A networking abstraction with basic implementation for unencrypted traffic over TCP sockets.
- An optional implementation of the networking abstraction using TLS encryption.
- Bindings to use the
ratchetweb-socket library on top of the networking abstraction. - A Tokio task to manage a bidirectional web-socket and handle communication with the core SwimOS runtime.
Modules§
- dns
- DNS support for resolving remote hosts.
- plain
- Basic networking support, without TLS support.
- websocket
- Bindings to use the
ratchetweb-sockets crate with the networking abstraction in this crate.
Structs§
- Remote
Task - A task that manages a socket connection. Incoming envelopes are routed to the appropriate downlink or agent. Agents will be resolved externally where required.
- Scheme
Host Port - A combination of host name and port to be used as a key into the routing table.
Enums§
- BadWarp
Url - Error type indicating that host URL is not valid for the Warp protocol.
- Connection
Error - Error to indicate why attempting to open a new connection failed.
- Listener
Error - Errors that can be generated when listening for incoming connections. Particularly, this distinguishes between an error in the listening process itself (after which we should stop listening) and error with an incoming connection (after which we can attempt to carry on listening).
- Scheme
- Supported websocket schemes
Traits§
- Client
Connections - Provides all networking functionality required for a Warp client (DNS resolution and opening sockets).
- External
Connections - Trait for types that can create remote network connections asynchronously. This is primarily used to abstract over ordinary sockets and sockets with TLS support.
- Listener
- Trait for servers that listen for incoming remote connections. This is primarily used to
abstract over
std::net::TcpListenerfor testing purposes. - Server
Connections - Provides all networking functionality required for a Warp server (listening for incoming connections).