TCPbasicappbase , socket, and ini

9 views
Skip to first unread message

Mohsen Sichani

unread,
Aug 18, 2014, 2:50:02 AM8/18/14
to omn...@googlegroups.com
Hi there

I am trying to understand the relation between the ini, TCPBasicClientApp, and socket.

In the ini I have created 3 tcpapp  in the client that will start at three different times and connect to three different servers. But, I can not see any code in the TCPBasicClientApp that defines the destination or even port.

I know that the TCPBasicClientApp at specific times (starttime) will call TCPappbase and TCPappbase will call socket and in socket those parameters will be set, but I am a little confused, How does actually TCPBasicClientApp combine different connection parameters together to establish a socket and does not mix up different connections that will start at different time?

In other words, How does TCPBasicClientApp diagnose when each tcpapplication should start and how does it set its parameters?


I hope that I have asked my question clearly. If it is ambiguous, please let me know,


I appreciated.

Cheers
Mohsen





Michael Kirsche

unread,
Aug 18, 2014, 3:06:40 AM8/18/14
to omn...@googlegroups.com
Take a look at StandardHost.ned.
There you can see that "tcpApp[numTcpApps]: <> like ITCPApp" --> numTcpApps parameter defines the number of actual applications that you use.
So 3 in your case. That means that three different submodules are created, each support their own parameter sets (which you have defined in your omnetpp.ini).
Each separate submodule gets initialized and thus each submodule's parameters are instantiated during runtime.
There is therefore not one global but three different TCPBasicClientApps running on your node, no need to differentiate inside TCPBasicClientApp between different connections, each app has a single parameter set.
Reply all
Reply to author
Forward
0 new messages