Package: inet.applications.tcpapp
TcpServerListener
simple moduleThis 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 to | function | info |
---|---|---|
TcpServerSocketIo | inet::TcpServerSocketIo::acceptSocket | acceptSocket |
MessageDispatcher | inet::MessageDispatcher::arrived | arrived |
Incoming messages (observed)
gate | msg | kind | ctrl | srcModule | tags |
---|---|---|---|---|---|
socketIn | Indication | 3 (TcpStatusInd::TCP_I_AVAILABLE) | TcpAvailableInfo | Tcp | SocketInd |
Outgoing messages (observed)
gate | msg | kind | ctrl | destModule | tags |
---|---|---|---|---|---|
socketOut | Request | 2 (TcpCommandCode::TCP_C_OPEN_PASSIVE) | TcpOpenCommand | Tcp | DispatchProtocolReq, SocketReq |
Shared Tagging operations (observed)
tagType | tagAction |
---|---|
DispatchProtocolReq | addTagIfAbsent |
SocketInd | findTag |
SocketReq | addTagIfAbsent |
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