接受后立即发送数据。数据丢失的可能性
Sending data immediately after accept. Data loss possibility
我在 msdn 上阅读了以下关于 accept
函数的内容:
https://msdn.microsoft.com/pl-pl/library/windows/desktop/ms737526(v=vs.85).aspx
When using the accept function, realize that the function may return
before connection establishment has traversed the entire distance
between sender and receiver. This is because the accept function
returns as soon as it receives a CONNECT ACK message; in ATM, a
CONNECT ACK message is returned by the next switch in the path as soon
as a CONNECT message is processed (rather than the CONNECT ACK being
sent by the end node to which the connection is ultimately
established). As such, applications should realize that if data is
sent immediately following receipt of a CONNECT ACK message, data loss
is possible, since the connection may not have been established all
the way between sender and receiver.
有人可以更详细地解释一下吗?它与SYN、SYN ACK有什么关系?这里有什么问题?那么这种数据丢失何时会发生,如何预防呢?
您在该页面上遗漏了一个重要段落,就在您引用之前:
The following are important issues associated with connection setup,
and must be considered when using Asynchronous Transfer Mode (ATM)
with Windows Sockets 2
也就是说,只有在使用AF_ATM
和SOCKADDR_ATM
时才适用。它与您似乎暗示的 TCP 无关:
What it has with SYN, SYN ACK
我在 msdn 上阅读了以下关于 accept
函数的内容:
https://msdn.microsoft.com/pl-pl/library/windows/desktop/ms737526(v=vs.85).aspx
When using the accept function, realize that the function may return before connection establishment has traversed the entire distance between sender and receiver. This is because the accept function returns as soon as it receives a CONNECT ACK message; in ATM, a CONNECT ACK message is returned by the next switch in the path as soon as a CONNECT message is processed (rather than the CONNECT ACK being sent by the end node to which the connection is ultimately established). As such, applications should realize that if data is sent immediately following receipt of a CONNECT ACK message, data loss is possible, since the connection may not have been established all the way between sender and receiver.
有人可以更详细地解释一下吗?它与SYN、SYN ACK有什么关系?这里有什么问题?那么这种数据丢失何时会发生,如何预防呢?
您在该页面上遗漏了一个重要段落,就在您引用之前:
The following are important issues associated with connection setup, and must be considered when using Asynchronous Transfer Mode (ATM) with Windows Sockets 2
也就是说,只有在使用AF_ATM
和SOCKADDR_ATM
时才适用。它与您似乎暗示的 TCP 无关:
What it has with SYN, SYN ACK