Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TCP stick package and unpacking #91

Open
xuanyuan5005 opened this issue Apr 10, 2020 · 2 comments
Open

TCP stick package and unpacking #91

xuanyuan5005 opened this issue Apr 10, 2020 · 2 comments

Comments

@xuanyuan5005
Copy link

Hi:David Fowler

Do you has a plan to process TCP stick package and unpacking?

@xuanyuan5005
Copy link
Author

xuanyuan5005 commented Apr 10, 2020

Packet sticking and unpacking are inevitable in TCP network programming.
eg:
Client send two message;
1-> | Header | Length | AA AA AA AA AA AA| Rear |
2-> | Header | Length | BB BB BB BB BB BB | Rear |

Server received message are three scenarios
1 Normal
Two message
_____________________________________________________
| Header | Length | AA AA AA AA AA AA| Rear |
_____________________________________________________
| Header | Length | BB BB BB BB BB BB | Rear |

2 Sticking
One message

| Header | Length | AA AA AA AA AA AA| Rear | | Header | Length | BB BB BB BB BB BB | Rear |

3 Unpacking
Greater than two message

  | Header |  Length  | AA AA AA AA
  _____________________________________________________
   AA AA|  Rear | 
  _____________________________________________________
  | Header |  Length  | BB 
  _____________________________________________________
  BB BB BB BB BB   |  Rear |

@sunyuliang
Copy link

这是最基本的功能,原始示例中的就有这功能

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants