UdpConnectCommand

UdpConnectCommand

class

Control info for connecting an UDP socket. To connect a socket, send a message to the Udp module with kind=UDP_C_CONNECT and an UdpConnectCommand attached. If the socket does not exist, it will be created.

Both the address and the port must be filled in.

See also: UdpCommandCode

Usage diagram

The following diagram shows usage relationships between types. Unresolved types are missing from the diagram.

Inheritance diagram

The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.

Extends

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.

Fields

Name Type Description
remoteAddr L3Address
remotePort int

Source code

//
// Control info for connecting an UDP socket. To connect a socket,
// send a message to the ~Udp module with kind=UDP_C_CONNECT and an
// ~UdpConnectCommand attached. If the socket does not exist,
// it will be created.
//
// Both the address and the port must be filled in.
//
// @see ~UdpCommandCode
//
class UdpConnectCommand extends UdpControlInfo
{
    L3Address remoteAddr;
    int remotePort = -1;
}


//
// 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, tags not required, or destAddr/destPort may be left blank (send()),
// otherwise it must contain the destination for the packet (sendto()).
//
// @see ~UdpCommandCode, ~PortsReq, ~L3AddressReq, ~InterfaceReq
//


File: src/inet/transportlayer/contract/udp/UdpControlInfo.msg