TcpCommand
classControl 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
Inheritance diagram
The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.
Extends
Name | Type | Description |
---|---|---|
cObject | (unknown -- not in documented files) |
Known subclasses
Name | Type | Description |
---|---|---|
TcpAcceptCommand | class |
Control info to be used to accept an available connection. |
TcpAvailableInfo | class |
Sent with message kind TCP_I_AVAILABLE, to let the app know about the local and remote IP address and port. |
TcpConnectInfo | class |
Sent with message kind TCP_I_ESTABLISHED, to let the app know about the local and remote IP address and port. |
TcpErrorInfo | class |
Currently not in use. |
TcpOpenCommand | class |
Control info to be used for active or passive TCP open. |
TcpSetOptionCommand | class |
Base class for TCP socket option control info classes. |
TcpStatusInfo | class |
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. |
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