Skip to main content

Crate moldudp

Crate moldudp 

Source

Structs§

Datagram
Message
A message is an atomic piece of information carried by the MoldUDP64 protocol. MoldUDP64 can theoretically handle individual messages from zero bytes up to 64KB in length although individual messages should be kept small enough so that the UDP underlying network protocol can efficiently carry the resulting MoldUDP64 packets. The contents of a MoldUDP64 message are defined by the higher level application. A message block: 2-byte big-endian length followed by length bytes of payload.
Messages
MoldUDP64
MoldUDP64 client.
MoldUDP64Server
Packet
A MoldUDP64 transmitter sends “downstream” packets that are received by MoldUDP64 listeners. A MoldUDP64 packet may contain a payload of 0 or more data stream messages. Each MoldUDP64 packet consists of a Downstream Packet Header and of a series of Message Blocks. The Message Blocks carry the actual data of the stream.
RetransmissionPacket
The Request Packet is sent to request the retransmission of a particular message or group of messages. The request packet is sent to a Re-request server. A receiver may need to send this request when it detects a sequence number gap in received messages. The response to a valid Request Packet is a standard Downstream Packet unicast back to the source of the retransmission request. This allows downstream MoldUDP64 users to read the retransmitted Downstream Packet in their multicast processing socket if the request was made from that socket (in other words, the client need only have one socket open to listen to the multicast and to process retransmissions, even though the retransmissions are not multicast).
RetransmissionRequest
ServerHandle

Enums§

MoldUdpError
PacketKind
SessionStatus

Constants§

END_OF_SESSION_IDENT
When the current session is complete, Downstream Packets are sent with a Message Count of 0xFFFF(hex, or 65535 in decimal) for a short while in place of Heartbeats. These Downstream Packets contain the next expected Sequence Number, just like Heartbeats. While the End of Session messages persist, re-requests may be made on the current session. This is the last chance to ensure that all messages have been received.
HEARTBEAT_IDENT
Heartbeats are sent periodically by the server so receivers can sense packet loss even during times of low traffic. Typically, these packets are transmitted once per second and contain the next expected Sequence Number. A Heartbeat packet is a MoldUDP64 packet with a Message Count of zero.