Study notes on network protocols

About the sticky packet sub-packaging of the TCP network protocol:

https://www.csdn.net/gather_25/MtTakgysOTMtYmxvZwO0O0OO0O0O.html


Why deal with sticky packages

Due to the mechanism of the TCP protocol, the client and server maintain a continuous data transmission. If the network data packet sent is too small, TCP will merge the smaller data packets before sending, and the receiving end cannot distinguish that the data is separated by the sending end, so a sticky packet problem occurs. If the data is too large, TCP may split the data into multiple parts to send, and the receiving end can only receive part of the information at a time, so the sub-packet problem occurs.


Recently, my own demo learning project about network socket programming, git address:

https://github.com/yuhezhangyanru/javaScoketGroupMessage.git


The description of the socket communication process between the client and the server is relatively clear:

https://www.cnblogs.com/Jasxu/p/Java-Socket.html


It is better to write about the introduction of the server blocking socket model and the description of the situation that will occur, as well as the explanations about half package, sticky package, and subpackage.

https://www.jianshu.com/p/cde27461c226

Quoting others in this article:

5.1 Half pack

The recipient did not receive a complete package, only a part of it.

Reason: In order to improve transmission efficiency, TCP allocates a packet large enough, so that the recipient cannot accept it all at once.

influences

Guess you like

Origin blog.csdn.net/Stephanie_1/article/details/107711658