TcpServerListener

Package: inet.applications.tcpapp

TcpServerListener

simple module

This module accepts/rejects TCP connections and creates TCP server connections as part of a generic TCP server application.

See also: TcpServerApp, TcpServerConnection

Inheritance diagram

The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.

Parameters

Name Type Default value Description
localAddress string ""

may be left empty ("")

localPort int 1000

port number to listen on

serverConnectionModuleType string "inet.applications.tcpapp.TcpServerConnection"

module type of "connection" module to launch on incoming connections

Properties

Name Value Description
display i=block/server

Gates

Name Direction Size Description
socketIn input
socketOut output

Direct method calls (observed)

call tofunctioninfo
TcpServerSocketIoinet::TcpServerSocketIo::acceptSocketacceptSocket
MessageDispatcherinet::MessageDispatcher::arrivedarrived

Incoming messages (observed)

gatemsgkindctrlsrcModuletags
socketInIndication3 (TcpStatusInd::TCP_I_AVAILABLE)TcpAvailableInfoTcpSocketInd

Outgoing messages (observed)

gatemsgkindctrldestModuletags
socketOutRequest2 (TcpCommandCode::TCP_C_OPEN_PASSIVE)TcpOpenCommandTcpDispatchProtocolReq, SocketReq

Shared Tagging operations (observed)

tagTypetagAction
DispatchProtocolReqaddTagIfAbsent
SocketIndfindTag
SocketReqaddTagIfAbsent

Source code

//
// This module accepts/rejects TCP connections and creates TCP server connections
// as part of a generic TCP server application.
//
// @see ~TcpServerApp, ~TcpServerConnection
//
simple TcpServerListener like IApp
{
    parameters:
        string localAddress = default(""); // may be left empty ("")
        int localPort = default(1000); // port number to listen on
        string serverConnectionModuleType = default("inet.applications.tcpapp.TcpServerConnection"); // module type of "connection" module to launch on incoming connections
        @display("i=block/server");
    gates:
        input socketIn;
        output socketOut;
}
File: src/inet/applications/tcpapp/TcpServerListener.ned