Network Programming - stick package unpacking

What is

Data packets may be split and merged

Why would merge and split

Intermediate router through a lot

How to deal with it

To identify the nature of a total length of time and sequence data. 1. The total length of the sequence number 2. Determination 4003rd TCP network protocol layers have been resolved, no application layer solution

All solutions are built around these two problems, and then solve these two problems.

Best Practices

TCP protocol layer has been resolved stick package unpacking question, why the application layer to solve it

TCP protocol layer tagged packet order, but how the recipient after receipt of the sort? The data is not in the form of flow of it? The total data length is fixed, this request can distinguish between different data. But how the recipient to solve the problem with different packet ordering a request?

Packet order require an application layer solution, because tcp protocol layer and the operating system kernel has been resolved.

Stick package and unpacking solutions have different?

That his mother is the problem ah, a bunch of questions to show that you did not understand clearly. Just know a little theory. This is not a great way to learn ah.

http protocol

Request line
header field
contents

The above three are separated by a newline. If it includes the line breaks, then the escape character.

How to solve the stick package unpacking netty

Before there is summed up. The solution is to have different solutions in different classes.

detail. Reference thing read notes.

Principle and the principle must be the same as mentioned earlier.

reference

Reproduced in: https: //juejin.im/post/5cf99be8e51d45775e33f52f

Guess you like

Origin blog.csdn.net/weixin_34174105/article/details/91453789