Class UDPControlInfo

File: Transport/Contract/UDPControlInfo.msg

Control info for sending/receiving data via UDP. Travels between application and the UDP module.

The most convenient way to handle UDP is the UDPSocket class, which hides UDPControlInfo completely from you. But even if you manage talking to UDP yourself without help from UDPSocket, sockId must be obtained from UDPSocket::generateSocketId().

See also: UDPCommandCode

Inheritance diagram:

The following diagram shows part of the inheritance hierarchy. Unresolved types are missing from the diagram. Click here to see the full picture.

Properties:

Name Value Description
omitGetVerb true

Fields:

Name Type Description
sockId int

uniquely identifies the UDP socket

userId int

id than can be freely used by the app

srcAddr IPvXAddress

source IP or IPv6 address, or local address with BIND

destAddr IPvXAddress

destination IP or IPv6 address

srcPort int

UDP source port in packet, or local port with BIND

destPort int

UDP destination port in packet

interfaceId int

interface on which pk was received/should be sent (see InterfaceTable)

Source code:

class UDPControlInfo
{
    properties:
        omitGetVerb = true;
    fields:
        int sockId = -1;   // uniquely identifies the \UDP socket
        int userId = -1;   // id than can be freely used by the app
        IPvXAddress srcAddr;  // source \IP or \IPv6 address, or local address with BIND
        IPvXAddress destAddr; // destination \IP or \IPv6 address
        int srcPort;   // \UDP source port in packet, or local port with BIND
        int destPort;  // \UDP destination port in packet
        int interfaceId = -1; // interface on which pk was received/should be sent (see InterfaceTable)
};