#include <IoCompletionListener.h>
Inheritance diagram for OW32::CIoCompletionListener:
Public Member Functions | |
CIoCompletionListener (CIoCompletionListenerCallback *callback) | |
Construct the listener with the given callback. | |
void | cancel () |
Cancel listening. | |
bool | cancelled () |
See if listening was cancelled. | |
int | listen (int port, HANDLE hCompletionPort) |
Listen on the given port. | |
int | postAccept () |
Post an accept. | |
CIoCompletionListener (CListenerCallback *pCallback) | |
Construct the listener with the given callback. | |
virtual void | Cancel () |
Cancel listening. | |
virtual bool | Cancelled () |
See if listening was cancelled. | |
void | onAcceptCompletion (BOOL bRet, DWORD cbTransferred, LPOVERLAPPED) |
callback from CIoCompletion, or from an APC model if you want that | |
virtual int | Listen (int port) |
Listen on the given port. | |
virtual int | Accept () |
Begin accepting connections. | |
int | ListenAndAcceptWithPort (int Port, HANDLE hCompletionPort) |
Listen and accept on a particular io completion port. | |
virtual int | GetAddresses (sockaddr_in **local_address, sockaddr_in **remote_address) |
Get the addresses following an onAcceptCompletion notification. | |
BOOL | associateWithIoCompletionPort (HANDLE hCompletionPort) |
Associate the listener with a given io completion port. | |
operator SOCKET () | |
extractor for the listening socket |
|
Construct the listener with the given callback.
|
|
Construct the listener with the given callback.
|
|
Associate the listener with a given io completion port.
|
|
Get the addresses following an onAcceptCompletion notification.
Implements OW32::CListener. |
|
Listen on the given port.
Reimplemented from OW32::CListener. |
|
Listen on the given port.
|
|
Post an accept. Call repeatedly for handling higher connection rates. Once an accept completes, it is not reposted. You can post another one if desired (or post the same one again), and keep a limit on the number of outstanding AcceptEx calls.
|