Hello guys!
I'm using NS3 in order to simulate a particular scenario in which a client receive a big file from a server. The communication use the TCP protocol in a particular way: instead of sending the file on a single TCP connection, the two nodes use a new TCP connection (on a different port) every X bytes.
For example (just to be more clear), if the file length is 1000 bytes and X is set to 10, the server sends the first 10 bytes on the port 8080, then sends the second 10 bytes on the port 8081, and so on...
Now my problem is that with big files, when the scenario require more than 16384 connections, the simulation gets an ERRNO = 12 (Cannot allocate memory) and NS3 is no longer able to create new sockets.
I enabled logging for the TCPSocket class and noticed that all the socket objects are destroyed at the end of the simulation and not when the Socket->Close() function is invoked. Is it right or is it expected to destroy the socket immediately?
And if NS3 destroys all the sockets at the end of the simulation by default, is there a way of forcing it to destroy them immediately? Or can i configure it to use more space and avoid ERRNO 12?
Thank you very much for your help.