UdpConnectCommand

Namespace: inet

class UdpConnectCommand

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

Inheritance diagram

Extends

Name

Type

Description

UdpCommandBase

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 UdpCommandBase
{
    L3Address remoteAddr;
    int remotePort = -1;
}

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