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

你好,请问一下如何确保数据发送完了? #28

Open
grasslog opened this issue Jun 26, 2019 · 5 comments
Open

你好,请问一下如何确保数据发送完了? #28

grasslog opened this issue Jun 26, 2019 · 5 comments

Comments

@grasslog
Copy link

No description provided.

@linyacool
Copy link
Owner

write/send结束就能确保数据发送完了。我猜你想问的是如何确保对方接收到数据?这个是需要应用层的回包来确认的哈

@grasslog
Copy link
Author

那么,假设发送的数据很多。客户端如何确保数据发送/接受完了呢?

@linyacool
Copy link
Owner

应用层来保证,比如消息格式(比如我以某个特殊字符结束就表示我发完了,再比如我开头写一个64位的数字表示我数据包的长度,收满这么多就结束了)

@grasslog
Copy link
Author

那个content-length表示的是什么呀?

@linyacool linyacool reopened this Jun 29, 2019
@linyacool
Copy link
Owner

@grasslog 表示内容长度啊

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