简体   繁体   English

TCP什么时候发送ACK?

[英]When does TCP sends ACK?

I have an application and I am seeing packets being re-transmitted multiple times.我有一个应用程序,我看到数据包被多次重新传输。 connection is reset after multiple re-transmits.多次重传后连接被重置。 In Wireshark, I can see the packet reaching the server, but I do not see the packet at the application level.在 Wireshark 中,我可以看到数据包到达服务器,但在应用程序级别看不到数据包。 I want to know how I can check if the packet is dropped at the TCP layer?我想知道如何检查数据包是否在 TCP 层被丢弃? When does TCP send DATA packet ACK? TCP什么时候发送DATA包ACK? After delivering the packet to an application or after receiving the DATA packet on the socket?在将数据包传递给应用程序之后还是在套接字上接收到 DATA 数据包之后?

ACK is sent to the server by the client after it has established a connection following the SYN-ACK packet.客户端在 SYN-ACK 数据包之后建立连接后,会向服务器发送 ACK。 在此处输入图像描述

When does TCP send DATA packet ACK? TCP什么时候发送DATA包ACK? After delivering the packet to an application or after receiving the DATA packet on the socket?在将数据包传递给应用程序之后还是在套接字上接收到 DATA 数据包之后?

The ACK is sent by the OS after the data are successfully put into the sockets read buffer.数据成功放入 sockets 读缓冲区后,由 OS 发送 ACK。 No application logic is involved here yet.这里还没有涉及应用程序逻辑。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM