TcpSinkApp

Package: inet.applications.tcpapp

TcpSinkApp

compound module

Accepts 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 tofunctioninfo
MessageDispatcherinet::MessageDispatcher::arrivedarrived

Incoming messages (observed)

gatemsgkindctrlsrcModuletags
socketInIndication3 (TcpStatusInd::TCP_I_AVAILABLE)TcpAvailableInfoTcpSocketInd
socketInIndication4 (TcpStatusInd::TCP_I_ESTABLISHED)TcpConnectInfoTcpSocketInd
socketInIndication5 (TcpStatusInd::TCP_I_PEER_CLOSED)TcpCommandTcpSocketInd
socketInIndication6 (TcpStatusInd::TCP_I_CLOSED)TcpCommandTcpSocketInd
socketInPacket1 (TcpStatusInd::TCP_I_DATA)TcpSocketInd

Outgoing messages (observed)

gatemsgkindctrldestModuletags
socketOutRequest2 (TcpCommandCode::TCP_C_OPEN_PASSIVE)TcpOpenCommandTcpDispatchProtocolReq, SocketReq
socketOutRequest3 (TcpCommandCode::TCP_C_ACCEPT)TcpAcceptCommandTcpDispatchProtocolReq, SocketReq
socketOutRequest5 (TcpCommandCode::TCP_C_CLOSE)TcpCommandTcpDispatchProtocolReq, SocketReq

Packet operations (observed)

chunkTypepacketAction
peekData

Shared Tagging operations (observed)

tagTypetagAction
DispatchProtocolReqaddTagIfAbsent
SocketIndfindTag, getTag
SocketReqaddTagIfAbsent

Region Tagging operations (observed)

tagTypetagAction
CreationTimeTaggetAllTags

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