Module message_io::network[][src]

Main module of message-io. It contains all the resources and tools to create and manage connections.

Re-exports

pub use crate::adapter::SendStatus;

Structs

Endpoint

Information to identify the remote endpoint. The endpoint is used mainly as a connection identified.

Network

Network is in charge of managing all the connections transparently. It transforms raw data from the network into message events and vice versa, and manages the different adapters for you.

ResourceId

Unique identifier of a network resource in your system. The identifier wrap 3 values,

Enums

AdapterEvent

Struct used to identify and event that an adapter has been produced. The upper layer can traduce this event into a crate::network::NetEvent that the user can manage easily.

NetEvent

Input network events.

RemoteAddr

An struct that contains a remote address. It can be Either, a SocketAddr as usual or a String used for protocols that needs more than a SocketAddr to get connected (e.g. WebSocket) It is usually used in crate::network::Network::connect() to specify the remote address.

ResourceType

Information about the type of resource

Transport

Enum to identified the underlying transport used. It can be passed to crate::network::Network::connect() and crate::network::Network::listen() methods to specify the transport used.

Traits

ToRemoteAddr

Similar to ToSocketAddrs but for a RemoteAddr. Instead of ToSocketAddrs that only can accept valid ‘ip:port’ string format, ToRemoteAddr accept any string without panic. If the string has the ‘ip:port’ format, it will be interpreted as a SocketAddr, if not, it will be interpreted as a string.