Expand description
It contains all the resources and tools to create and manage connections.
Re-exports§
pub use adapter::SendStatus;
Modules§
- adapter
- Module that specify the pattern to follow to create adapters. This module is not part of the public API itself, it must be used from the internals to build new adapters.
Structs§
- Endpoint
- Information to identify the remote endpoint. The endpoint is used mainly as a connection identified.
- Network
Controller - Shareable instance in charge of control all the connections.
- Network
Processor - Instance in charge of process input network events.
These events are offered to the user as a
NetEventits processing data. - Resource
Id - Unique identifier of a network resource in your system. The identifier wrap 3 values,
Enums§
- NetEvent
- Enum used to describe a network event that an internal transport adapter has produced.
- Readiness
- Used for the adapter implementation. Specify the kind of event that is available for a resource.
- Remote
Addr - An struct that contains a remote address.
It can be Either, a
SocketAddras usual or aStringused for protocols that needs more than aSocketAddrto get connected (e.g. WebSocket) It is usually used inNetworkController::connect()to specify the remote address. - Resource
Type - Information about the type of resource
- Transport
- Enum to identified the underlying transport used.
It can be passed to
NetworkController::connect()andNetworkController::listen()methods to specify the transport used. - Transport
Connect - Transport
Listen
Traits§
- ToRemote
Addr - Similar to
ToSocketAddrsbut for aRemoteAddr. Instead ofToSocketAddrsthat only can accept valid ‘ip:port’ string format,ToRemoteAddraccept any string without panic. If the string has the ‘ip:port’ format, it will be interpreted as aSocketAddr, if not, it will be interpreted as a string.
Functions§
- split
- Create a network instance giving its controller and processor.