#include <Listener.h>
Inheritance diagram for OW32::CListener:

Public Member Functions | |
| CListener (CListenerCallback *pCallback) | |
| Construct a listener object with the given callback. | |
| virtual | ~CListener ()=0 |
| Tidy up the listener object. | |
| virtual void | Cancel () |
| Cancel listening. | |
| virtual bool | Cancelled () |
| See if listening was cancelled. | |
| CListenerCallback * | GetCallback () const |
| Return the callback object. | |
| int | GetPort () const |
| Return the port that this object is listening on. | |
| virtual BOOL | Listen (int port) |
| Start listening on the given port. | |
| virtual int | Accept ()=0 |
| Accept the next connection. | |
| virtual int | ListenAndAccept (int port) |
| combines Listen and Accept | |
| virtual int | GetAddresses (sockaddr_in **local_address, sockaddr_in **remote_address)=0 |
| Get the addresses following an onAcceptCompletion notification. | |
| virtual int | GetRemoteAddress (sockaddr_in **remote_address) |
| Get the remote address following an onAcceptCompletion notification. | |
| virtual int | GetLocalAddress (sockaddr_in **local_address) |
| Get the local address following an onAcceptCompletion notification. | |
| virtual SOCKET | DetachAcceptedSocket () |
| Detach and return the accepted socket handle. | |
Protected Attributes | |
| int | m_port |
| The port that we are listening on. | |
| CSocket | m_sListen |
| The socket used by the listener. | |
| XSOCKET | m_sAccepted |
| The recently accepted socket. | |
| CListenerCallback * | m_pCallback |
| The accept notification callback object. | |
|
|
Construct a listener object with the given callback.
|
|
||||||||||||
|
Get the addresses following an onAcceptCompletion notification.
Implemented in OW32::CIoCompletionListener, and OW32::CMessageListener. |
|
|
Get the local address following an onAcceptCompletion notification.
|
|
|
Get the remote address following an onAcceptCompletion notification.
|
|
|
Start listening on the given port.
Reimplemented in OW32::CIoCompletionListener. |
|
|
|
1.3.9.1