OWLNext 7.0
Borland's Object Windows Library for the modern age
|
The code below, a non-blocking socket is created on a server.
This socket is bound, starts asynchronous notification, and then starts listening. Some time later, Winsock posts an accept notification, and this causes the listening socket's DoAcceptNotification() function to be called. At this point, the listening socket's Accept() function can be called to complete the acceptance.
Note that the tempSocket doesn't get initialized to have any address; it will get set by the Accept() call.
This example does not use any error checking and reporting. Creating and Connecting a Stream Server and Client shows a similiar sequence of operations.