Class TCPCommand

File: Transport/Contract/TCPCommand.msg

C++ definition: click here

Control info for TCP connections. This class is to be set as control info (see cMessage::setControlInfo()) on all messages exchanged between TCP and application, in both directions. Some commands and indications (TCP_C_OPEN_xxx, TCP_I_STATUS) use subclasses.

connId identifies the connection locally within the application (internally, TCP uses the (app gate index, connId) pair to identify the socket). connId is to be chosen by the application in the open command.

See also: TcpCommandCode, TcpStatusInd, TCPOpenCommand, TCPStatusInfo, TCP

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.

Known subclasses:

TCPErrorInfo

Currently not in use.

TCPOpenCommand

Control info to be used for active or passive TCP open.

TCPSendCommand

Control info to be used with the SEND command.

TCPConnectInfo

Sent with message kind TCP_I_ESTABLISHED, to let the app know about the local and remote IP address and port.

TCPStatusInfo

Sent with message kind TCP_I_STATUS, in response to command TCP_C_STATUS. For explanation of variables, see RFC 793 or TCPStateVariables in TCPConnection.h.

Properties:

Name Value Description
omitGetVerb true

Fields:

Name Type Description
connId int

identifies the socket within the application

userId int

id than can be freely used by the app

Source code:

class TCPCommand
{
    properties:
        omitGetVerb = true;
    fields:
        int connId = -1;   // identifies the socket within the application
        int userId = -1;   // id than can be freely used by the app
};