Oct 15, 2010

Sending datablock in Python with > 65536 bytes fails

In a Simulation Script, I used the ThreadingTCPServer from SocketServer.

The simulation data which should be sent back is larger than 65536 bytes,
but the other side just hang around and doesn't receive everything.

Both parts are executed on the same machine with Solaris 10.

To get all the data over the network, I'm now using a loop sending just
blocks of 10000 bytes and sleeping between with time.sleep( 0.3 ) some time.

I think, the network buffer of the OS isn't large enough to hold the full data
and therefore drops some of it, causing the missing parts on the receiver side.