-
Notifications
You must be signed in to change notification settings - Fork 0
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连接管理 #22
Comments
问题
TCP是一个面向连接的、可靠的传输层协议。而tcp协议用来保证可靠、有序的根本是通过什么------序列号。所以说,握手的本质是为了同步A、B的初始序列号,那这样的话,本来是需要握手四次的。但是通过,将2、3步合并(在一个报文段里既确认了对方的序列号,又告知了自己的序列号),就可以提高效率简化为三次握手了。 |
PS:当时写到四次挥手的时候,在想:为什么不把四次挥手中的第二步和第三步合并呢?B的ACK和FIN在一个报文段里都给发送了啊,还提高了效率。后来查了下,发现还真存在三次挥手! 大概就是说,当A向B发起FIN,B也确定再没有数据需要发送给A,那么它就可以将四次挥手简化为三次挥手了 |
如果挥手过程中前两次fin ack已完成。但是b不立即发fin给a,而是继续写数据,写完之后才发fin,结果如何? |
No description provided.
The text was updated successfully, but these errors were encountered: