[−][src]Module internet2::transport
LNP transport level works with framed messages of defined size. This messages can be put into different underlying transport protocols, including streaming protocols (like TCP), or overlaid over application-level protocols like HTTP, Websockets, SMTP (for high-latency communication networks). Current mod implements such overlays and provides TCP with the required framing functionality (this variant is called FTCP). It also integrates with ZMQ such that the upper level can abstract for a particular transport protocol used.
Re-exports
pub use socket_addr::FramingProtocol; |
pub use socket_addr::LocalSocketAddr; |
pub use socket_addr::RemoteSocketAddr; |
pub use zmqsocket::ZmqSocketAddr; |
pub use zmqsocket::ZmqType; |
pub use zmqsocket::ZMQ_CONTEXT; |
pub use zmqsocket::ZMQ_CONTEXT; |
Modules
ftcp | Framed TCP protocol: reads & writes frames (corresponding to LNP messages) from TCP stream |
socket_addr | Module supports transport-level addressing, i.e. the one used before
encryption/decryption of the actual data are taking place. These addresses
is mostly used internally and does not include information about node
public key (for that purpose you need to use session-level address
structures like |
websocket | |
zmqsocket |
Structs
RoutedFrame |
Enums
Error | Transport protocol-level errors |
Constants
FRAME_PREFIX_SIZE | Size of the frame prefix which is not included into payload size, consisting of the 2-bytes message size data and 16-byte MAC of the payload length |
FRAME_SUFFIX_SIZE | Size of the frame suffix represented by a 16-byte MAC of the frame payload |
MAX_FRAME_PAYLOAD_SIZE | Maximum size of the frame payload which may be expressed by two bytes |
MAX_FRAME_SIZE | Maximum size of the transport frame; chosen in compliance with LN specs |
Traits
Duplex | Marker trait for types that can provide a concrete implementation for both
frame parser implementing |
RecvFrame | Frame receiving type which is able to parse raw data (streamed or framed by an underlying overlaid protocol such as ZMQ, HTTP, Websocket). |
SendFrame | Frame sending type which is able to compose frame with a given raw data and send it via an underlying overlaid protocol such as ZMQ, HTTP, Websocket. |