Skip to main content

Crate udp

Crate udp 

Available on crate features std and udp only.
Expand description

Protocol-neutral UDP module for Rama.

Applications use the reexported Tokio UdpSocket and the simple bind helpers. Packet-oriented protocols use the runtime-neutral DatagramSocket and DatagramSender traits, with UdpPacketSocket as the Tokio-backed implementation. test_utils provides a deterministic in-memory backend when its feature is enabled.

This crate reports socket implementation limits and ancillary capabilities. It does not infer a path MTU or provide congestion control, retransmission, or other upper-transport behavior.

§Rama

Crate used by the end-user rama crate and rama crate authors alike.

Learn more about rama:

Modules§

test_utilstest-utils
Utilities for testing datagram protocols without operating-system sockets.

Structs§

ConnectedUdpFramed
A unified Stream and Sink of frames over a connected UdpSocket.
DatagramCapabilities
UDP implementation and ancillary-I/O capabilities of a socket.
DatagramMetadata
Metadata associated with one receive buffer.
SendDatagram
Borrowed description of one outgoing datagram or segmented datagram group.
UdpFramed
A unified Stream and Sink interface to an underlying UdpSocket, using the Encoder and Decoder traits to encode and decode frames.
UdpPacketSender
Send handle for a UdpPacketSocket.
UdpPacketSocket
Packet-oriented Tokio UDP socket with portable ancillary metadata.
UdpSocketnet
A UDP socket.
UdpSocketConfig
Configuration shared by UDP packet-socket factories.
UdpSocketFactory
Rama service/factory for configured UdpPacketSocket instances.

Enums§

DatagramError
Error from a packet-oriented datagram operation.
DatagramFeature
Datagram feature that can be unavailable on a platform or socket provider.
EcnCodepoint
Explicit Congestion Notification codepoint from the low two IP traffic-class bits.
ReceiveTimestamp
Receive time together with the clock domain used by its producer.
SendFailure
Coarse classification of a failed send.

Constants§

MAX_UDP_PAYLOAD_IPV4
Largest UDP payload representable by ordinary IPv4.
MAX_UDP_PAYLOAD_IPV6
Largest UDP payload representable by ordinary IPv6 without jumbograms.

Traits§

DatagramSender
Independently wakeable send side of a DatagramSocket.
DatagramSenderExt
Async convenience methods for DatagramSender.
DatagramSocket
Receive side of an asynchronous packet-oriented datagram socket.
DatagramSocketExt
Async convenience methods for DatagramSocket.

Functions§

bind_udp_socket_with_connect
Bind a UdpSocket to the local interface and connect to the given IP host and port.
bind_udp_with_address
Creates a new UdpSocket, which will be bound to the specified address.
bind_udp_with_deviceAndroid or Fuchsia or Linux
Creates a new UdpSocket, which will be bound to the specified (interface) device name).
bind_udp_with_sockettarget_family=unix or Windows
Creates a new UdpSocket, which will be bound to the specified socket.