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

Properties

Name Value Description
display i=block/sink
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, vector s none

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,vector; interpolationmode=none; checkSignals=false);
}

File: src/inet/applications/tcpapp/TcpSinkApp.ned