Synchronous and asynchronous terminology when talking about sockets
c++, network-programming, sockets, terminology, windows
Solution
Read and write on a socket in a blocking mode is considered synchronous.
Yes.
Read and write on a socket in a non-blocking mode is considered asynchronous.
No. It is synchronous. The operation completes or fails inline in the current thread.
Read and write on a socket using Overlapped I/O is considered asynchronous.
Correct. The function call posts the operation to be done, which proceeds independently of the current thread, and a later operation is required to determine its success or failure, or there is a completion callback.
Problem
I do not fully understand what does it mean when they say something like: "asynchronous read and write operations" or "synchronous read and write operations". I will give examples to demonstrate my understanding of the terminology and correct if I am wrong: - Read and write on a socket in a blocking mode is considered synchronous. - Read and write on a socket in a non-blocking mode is considered asynchronous. - Read and write on a socket using Overlapped I/O is considered asynchronous.