Is It Is Possible To Force Tcp Socket To Send 0 Bytes In Case Of Packet Losses - Python
I am writing a simple file client-server communication to transfer a file with TCP. The code I want to implement it using python socket programming. I follow this example. I am wo
Solution 1:
No, sending 0 bytes is an indicator that the socket has been properly closed and this is part of the TCP protocol. What you're trying to do is alter the TCP protocol which already handles packet loss. You can certainly send data that indicates packet loss, but it would be received after the retry attempts were completed for data that was previously lost and would not help you. It sounds like what you're trying to do would be better suited by using UDP and writing your own logic around packet loss, but then you have to handle out of order data as well.
Post a Comment for "Is It Is Possible To Force Tcp Socket To Send 0 Bytes In Case Of Packet Losses - Python"