TcpCommand

Namespace inet

TcpCommand

class

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, ITcp

Extends

Name Type Description
cObject (unknown -- not in documented files)

Fields

Name Type Description
userId int

id than can be freely used by the app

Source code

//
// 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.
//
//# TODO explain userId
//
// @see ~TcpCommandCode, ~TcpStatusInd, ~TcpOpenCommand, ~TcpStatusInfo, ~ITcp
//
class TcpCommand extends cObject
{
    int userId = -1;   // id than can be freely used by the app
}

File: src/inet/transportlayer/contract/tcp/TcpCommand.msg