OWLNext 7.0
Borland's Object Windows Library for the modern age
|
The code below reads data from a socket.
Since this is a datagram example, we simply read the next datagram that gets received. It is important to note that Windows Socket classes don't consider a WSAEWOULDBLOCK return from Recv() as an error. Thus, when you call Read() in non-blocking mode, and the Read() internally encounters a WSAEWOULDBLOCK, it simply sets nBytes to zero and returns without an error. Only real errors are returned by Windows Socket functions.