Crate swimos_remote

Crate swimos_remote 

Source
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 ratchet web-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 ratchet web-sockets crate with the networking abstraction in this crate.

Structs§

RemoteTask
A task that manages a socket connection. Incoming envelopes are routed to the appropriate downlink or agent. Agents will be resolved externally where required.
SchemeHostPort
A combination of host name and port to be used as a key into the routing table.

Enums§

BadWarpUrl
Error type indicating that host URL is not valid for the Warp protocol.
ConnectionError
Error to indicate why attempting to open a new connection failed.
ListenerError
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§

ClientConnections
Provides all networking functionality required for a Warp client (DNS resolution and opening sockets).
ExternalConnections
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::TcpListener for testing purposes.
ServerConnections
Provides all networking functionality required for a Warp server (listening for incoming connections).