Callback doesn't works in TCP socket.

50 views
Skip to first unread message

Mateus Sousa

unread,
Apr 1, 2017, 8:48:10 PM4/1/17
to ns-3-users
Hi,

I'm simulating a simple client-server app, but the tcp socket setRecvCallback isn't working. And there is not TCP packets in the traces/pcaps.

Can someone figure out the problem?

Konstantinos

unread,
Apr 2, 2017, 4:49:36 AM4/2/17
to ns-3-users
Hi Mateus,

Please read the posting guidelines, particularly the part on how to ask for help.
You haven't provided details for your simulation, whether you created a new application etc.
A minimal working example would be needed.

Regards,
K

Mateus Sousa

unread,
Apr 2, 2017, 9:02:16 AM4/2/17
to ns-3-users
Sorry Konstantinos,
my mistake.

I'm simulating a simple client-server app in a VANETs environment. Here are the steps of my app:
1º Starts a service discovery by sending broadcasts messages to the neighbours;
2º Listen for replies and choose the best providers;
3º Starts a connection with the providers, one by one, and send the req pkts;
4º Listen for replies; # <- Here is the problem, the RecvCallback doesn't works.

I can't send my code (orders from my guide);

Thanks in advance.

Matt Anonyme

unread,
Apr 2, 2017, 10:34:04 AM4/2/17
to ns-3-users
Might be that you set the callback only on the original server socket but you need to set the callback on the forked server socket ?

Tommaso Pecorella

unread,
Apr 2, 2017, 10:43:29 AM4/2/17
to ns-3-users
I'm almost sure that this is the case.
Please check the PacketSink::HandleAccept code.

T.

Mateus Sousa

unread,
Apr 2, 2017, 2:09:58 PM4/2/17
to ns-3-users
Ok, I will.

Thanks for the support!
Reply all
Reply to author
Forward
0 new messages