Some functions in the Win32 socket are blocked by default, such as accept (), send (), recv (), and so on, where the blocking concept of Send () and recv () differs from the blocking concept of accept ().
Send () and recv () are just a copy of the data, that is, the Send () function simply puts the data into the send buffer, and the actual sending work is done by the network protocol; the recv () function simply reads the data from the receive buffer. The operation that actually receives the data is done by the network protocol. The blocking of Send () is primarily caused by the sending of data to fill the send buffer, and the blocking of recv () is due to no data being read in the receive buffer.
socket blocking and non-blocking settings are performed by the function Ioctrlsocket () function, and the corresponding blocking time limit is Number of setsockopt () to set . See Resources.
Reference 1 related setup functions
Reference 2 Related concepts
Win32 socket blocking and non-blocking functions and settings