#include <AsyncSocket.h>
Inheritance diagram for OW32::CAsyncSocketBase:

Public Member Functions | |
| CAsyncSocketBase (CAsyncSocketCallback *pCallback) | |
| Construct an uninitialised socket with the given callback. | |
| CAsyncSocketBase (CAsyncSocketCallback *pCallback, SOCKET s) | |
| Constructor taking ownership of an existing socket. | |
| virtual | ~CAsyncSocketBase () |
| Virtual d'tor as this is a base class. | |
| void | setCallback (CAsyncSocketCallback *pCallback) |
| Set the callback for the socket. | |
| CAsyncSocketCallback * | getCallback () const |
| Get the callback for the socket. | |
| operator SOCKET () | |
| Extractor for the encapsulated socket. | |
| operator HANDLE () | |
| Extractor for the encapsulated socket. | |
| SOCKET | detach () |
| Detach the encapsulated socket. | |
| void | attach (SOCKET s) |
| Attach a new socket. | |
| virtual void | setTimeout (DWORD timeout) |
| Set the timeout for the socket. | |
| virtual DWORD | getTimeout () |
| Get the timeout for the socket. | |
| virtual int | close () |
| Close the encapsulated socket handle. | |
| int | bind (const struct sockaddr *name, int namelen) |
| Bind the socket. | |
| int | bind (CSockAddrIn &sockaddr_in) |
| Bind the socket to a CSockAddrIn encapsulated address. | |
| int | listen (int backlog=SOMAXCONN) |
| Listen on the socket. | |
| virtual SOCKET | accept (sockaddr *addr, int *addrlen) |
| Start accepting connections on the given socket. | |
| virtual SOCKET | accept (CSockAddrIn &sockaddr_in) |
| Start accepting connections on the given socket. | |
| virtual int | connect (const struct sockaddr *name, int namelen) |
| Connect to a remote server (stream) or set a default outgoing address for send (datagram). | |
| virtual int | connect (CSockAddrIn &sockaddr_in) |
| Connect to a remote server (stream) or set a default outgoing address for send (datagram). | |
| virtual int | shutdown (int how) |
| Shutdown the socket. | |
| virtual int | recv (char *buf, int len)=0 |
| Asynchronous recv. | |
| virtual int | send (const char *buf, int len)=0 |
| Asynchronous send. | |
| virtual int | sendv (WSABUF *bufs, DWORD nbufs) |
| Asynchronous vector send. | |
| virtual int | transmitFile (HANDLE hFile, DWORD nNumberOfBytesToWrite, DWORD nNumberOfBytesPerSend, LPTRANSMIT_FILE_BUFFERS lpTransmitBuffers, DWORD dwFlags) |
| Asynchronous transmitFile. | |
Protected Attributes | |
| CAsyncSocketCallback * | m_pCallback |
| The callback function. | |
| SOCKET | m_socket |
| The socket. | |
| DWORD | m_timeout |
| The timeout. | |
|
|
Construct an uninitialised socket with the given callback.
|
|
||||||||||||
|
Constructor taking ownership of an existing socket.
|
|
|
Start accepting connections on the given socket. Note -- does not lock -- assumes this is part of socket construction.
|
|
||||||||||||
|
Start accepting connections on the given socket. Note -- does not lock -- assumes this is part of socket construction.
|
|
|
Attach a new socket. Note: socket must be idle for this to be safe.
|
|
|
Bind the socket to a CSockAddrIn encapsulated address. Note -- does not lock -- assumes this is part of socket construction.
|
|
||||||||||||
|
Bind the socket. Note -- does not lock, assumes this is prat of socket construction.
|
|
|
Connect to a remote server (stream) or set a default outgoing address for send (datagram).
Reimplemented in OW32::CAsyncBlockingSocket, OW32::CAsyncIoCompletionSocket, OW32::CAsyncAPCSocket, and OW32::CAsyncMessageSocket. |
|
||||||||||||
|
Connect to a remote server (stream) or set a default outgoing address for send (datagram).
Reimplemented in OW32::CAsyncBlockingSocket, OW32::CAsyncIoCompletionSocket, OW32::CAsyncAPCSocket, and OW32::CAsyncMessageSocket. |
|
|
Get the callback for the socket.
|
|
|
Get the timeout for the socket.
|
|
|
Listen on the socket. Note -- does not lock -- assumes this is part of socket construction.
|
|
||||||||||||
|
Asynchronous recv. onReadCompletion will be called when the read completes.
Implemented in OW32::CAsyncBlockingSocket, OW32::CAsyncIoCompletionSocket, OW32::CAsyncAPCSocket, and OW32::CAsyncMessageSocket. |
|
||||||||||||
|
Asynchronous send. onSendCompletion will be called when the send completes.
Implemented in OW32::CAsyncBlockingSocket, OW32::CAsyncIoCompletionSocket, OW32::CAsyncAPCSocket, and OW32::CAsyncMessageSocket. |
|
||||||||||||
|
Asynchronous vector send. onSendCompletion will be called when the send completes. Not be supported for all socket types yet.
Reimplemented in OW32::CAsyncIoCompletionSocket. |
|
|
Set the callback for the socket. Must only be used when the socket is idle.
|
|
|
Set the timeout for the socket.
Reimplemented in OW32::CAsyncIoCompletionSocket. |
|
|
Shutdown the socket.
Reimplemented in OW32::CAsyncIoCompletionSocket. |
|
||||||||||||||||||||||||
|
Asynchronous transmitFile. onTransmitFileCompletion will be called when the send complets. May not be supported for all socket types yet.
Reimplemented in OW32::CAsyncIoCompletionSocket. |
1.3.9.1