Using Event Objects
A version of this page is also available for
4/8/2010
Windows Sockets event objects are fairly simple constructs that can be created and closed, set and cleared, waited on, and polled. Typically, clients create an event object and supply the handle as a parameter (or as an element 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, also called signaled. The client may subsequently clear or reset the event object and use it again.