Control info for sending data via UDP. To send a packet, send it to the UDP module with kind=UDP_C_SEND and an UDPSendCommand attached.
UDP_C_SEND/UDPSendCommand models both the Unix send() and sendto() calls. If the socket is connected, destAddr/destPort may be left blank (send()), otherwise it must contain the destination for the packet (sendto()).
See also: UDPCommandCode
The following diagram shows usage relationships between types. Unresolved types are missing from the diagram.
The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.
Name | Type | Description |
---|---|---|
UDPControlInfo | class |
Base class for UDP control info classes. The most convenient way to handle UDP is the UDPSocket class, which hides control info from you. |
Name | Type | Description |
---|---|---|
destAddr | L3Address |
destination IPv4 or IPv6 address |
destPort | int |
destination port |
srcAddr | L3Address |
source address |
interfaceId | int |
interface on which the packet must be sent (see InterfaceTable) |
sockId | int |
must uniquely identify the socket in the UDP module |
// // Control info for sending data via UDP. To send a packet, send it to // the ~UDP module with kind=UDP_C_SEND and an ~UDPSendCommand attached. // // UDP_C_SEND/~UDPSendCommand models both the Unix send() and sendto() calls. // If the socket is connected, destAddr/destPort may be left blank (send()), // otherwise it must contain the destination for the packet (sendto()). // // @see ~UDPCommandCode // class UDPSendCommand extends UDPControlInfo { L3Address destAddr; // destination IPv4 or IPv6 address int destPort = -1; // destination port L3Address srcAddr; // source address int interfaceId = -1; // interface on which the packet must be sent (see ~InterfaceTable) }