John Lock 2
John Lock 2

Reputation: 43

Sending data immediately after accept. Data loss possibility

I have read following on msdn about accept function:

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.

Could someone explain it in more details? What it has with SYN, SYN ACK? What's the problem here? So when such data loss can happen, and how to prevent it?

Upvotes: 0

Views: 52

Answers (1)

cnicutar
cnicutar

Reputation: 182619

You're omitting an important paragraph on that page, right before your quote:

The following are important issues associated with connection setup, and must be considered when using Asynchronous Transfer Mode (ATM) with Windows Sockets 2

That is, it is only applicable when you use things like AF_ATM and SOCKADDR_ATM. It is not relevant for TCP which you seem to imply with:

What it has with SYN, SYN ACK

Upvotes: 1

Related Questions