TcpCommand¶
Namespace: inet
class TcpCommand
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
Inheritance diagram¶
Extends¶
Name |
Type |
Description |
|---|---|---|
cObject |
(unknown – not in documented files) |
Known subclasses¶
Name |
Type |
Description |
|---|---|---|
class |
Control info to be used to accept an available connection. |
|
class |
Sent with message kind TCP_I_AVAILABLE, to let the app know about the local and remote IP address and port. |
|
class |
Sent with message kind TCP_I_ESTABLISHED, to let the app know about the local and remote IP address and port. |
|
class |
Currently not in use. |
|
class |
Control info to be used for active or passive TCP open. |
|
class |
Control info that represents a READ request. Tcp only accepts READ requests from the user when the connection was opened with autoRead=false. |
|
class |
Base class for TCP socket option control info classes. |
|
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(1,:ref:2 <neddoc-msg-inet-tcp-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
}