Package: inet.applications.tcpapp
TcpSinkApp
compound moduleAccepts any number of incoming TCP connections, and discards whatever arrives on them. Compatible with both Ipv4 and Ipv6.
Inheritance diagram
The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.
Extends
Name | Type | Description |
---|---|---|
TcpServerHostApp | simple module |
This module hosts TCP-based server applications. It dynamically creates and launches a new "thread" object for each incoming connection. |
Parameters
Name | Type | Default value | Description |
---|---|---|---|
localAddress | string | "" |
may be left empty ("") |
localPort | int | 1000 |
port number to listen on |
serverThreadModuleType | string | "inet.applications.tcpapp.TcpSinkAppThread" |
module type of "thread" module to launch on incoming connections |
stopOperationExtraTime | double | -1s |
extra time after lifecycle stop operation finished |
stopOperationTimeout | double | 2s |
timeout value for lifecycle stop operation |
Properties
Name | Value | Description |
---|---|---|
display | i=block/sink | |
lifecycleSupport | ||
class | TcpSinkApp |
Gates
Name | Direction | Size | Description |
---|---|---|---|
socketIn | input | ||
socketOut | output |
Statistics
Name | Title | Source | Record | Unit | Interpolation Mode |
---|---|---|---|---|---|
packetReceived | packets received | packetReceived | count, sum(packetBytes), vector(packetBytes) | none | |
endToEndDelay | end-to-end delay | dataAge(packetReceived) | histogram, weightedHistogram, vector | s | none |
Direct method calls (observed)
call to | function | info |
---|---|---|
MessageDispatcher | inet::MessageDispatcher::arrived | arrived |
Incoming messages (observed)
gate | msg | kind | ctrl | srcModule | tags |
---|---|---|---|---|---|
socketIn | Indication | 3 (TcpStatusInd::TCP_I_AVAILABLE) | TcpAvailableInfo | Tcp | SocketInd |
socketIn | Indication | 4 (TcpStatusInd::TCP_I_ESTABLISHED) | TcpConnectInfo | Tcp | SocketInd |
socketIn | Indication | 5 (TcpStatusInd::TCP_I_PEER_CLOSED) | TcpCommand | Tcp | SocketInd |
socketIn | Indication | 6 (TcpStatusInd::TCP_I_CLOSED) | TcpCommand | Tcp | SocketInd |
socketIn | Packet | 1 (TcpStatusInd::TCP_I_DATA) | Tcp | SocketInd |
Outgoing messages (observed)
gate | msg | kind | ctrl | destModule | tags |
---|---|---|---|---|---|
socketOut | Request | 2 (TcpCommandCode::TCP_C_OPEN_PASSIVE) | TcpOpenCommand | Tcp | DispatchProtocolReq, SocketReq |
socketOut | Request | 3 (TcpCommandCode::TCP_C_ACCEPT) | TcpAcceptCommand | Tcp | DispatchProtocolReq, SocketReq |
socketOut | Request | 5 (TcpCommandCode::TCP_C_CLOSE) | TcpCommand | Tcp | DispatchProtocolReq, SocketReq |
Packet operations (observed)
chunkType | packetAction |
---|---|
peekData |
Shared Tagging operations (observed)
tagType | tagAction |
---|---|
DispatchProtocolReq | addTagIfAbsent |
SocketInd | findTag, getTag |
SocketReq | addTagIfAbsent |
Region Tagging operations (observed)
tagType | tagAction |
---|---|
CreationTimeTag | getAllTags |
Source code
// // Accepts any number of incoming TCP connections, and discards whatever // arrives on them. Compatible with both ~Ipv4 and ~Ipv6. // module TcpSinkApp extends TcpServerHostApp { parameters: serverThreadModuleType = default("inet.applications.tcpapp.TcpSinkAppThread"); @class(TcpSinkApp); @display("i=block/sink"); @statistic[packetReceived](title="packets received"; source=packetReceived; record=count,"sum(packetBytes)","vector(packetBytes)"; interpolationmode=none; checkSignals=false); @statistic[endToEndDelay](title="end-to-end delay"; source="dataAge(packetReceived)"; unit=s; record=histogram,weightedHistogram,vector; interpolationmode=none; checkSignals=false); }File: src/inet/applications/tcpapp/TcpSinkApp.ned