Class UDPConnectCommand

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

C++ definition

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
sockId int

must uniquely identify the socket in the UDP module

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;
}