Relative Content

Tag Archive for pythonsocketsnetworkingtcp

Python TCP receives small segment sizes during transmission

During transmission from my client to my Python server it was observed that the packet segments being received are of size 28B or there around. In turn a 364B message is taking around 41 packets between client and sever to be fully received by Python where then it’s dumped to the socket stream and read in. The latency observed by wire shark shows that it takes around 40 seconds to fully receive the message before Python begins processing it. Another thing to note that heartbeats decide and are of size 40B which in turn shows that the heartbeats show nearly no latency, < 1s based on the script I wrote that compares pcap to the json stream I record for each messages arrival time.