Platform SDK: Windows Sockets

Using Event Objects

Windows Sockets event objects are fairly simple constructs which can be created and closed, set and cleared, waited upon and polled. The general usage model is for clients to create an event object and supply the handle as a parameter (or as a component of a parameter structure) in functions such as WSPSend and WSPEventSelect. When the nominated condition has occurred, the service provider uses the handle to set the event object by calling WPUSetEvent. Meanwhile, the Windows Sockets SPI client may either block and wait or poll until the event object becomes set (or as it is sometimes called: signaled). The client may subsequently clear or reset the event object and use it again.