TWinAsyncSocket< T > Class Template ReferenceProvides asynchronous socket communications.
More...
#include <WinAsyncSocket.h>
Inheritance diagram for TWinAsyncSocket< T >:
[legend]Collaboration diagram for TWinAsyncSocket< T >:
[legend]List of all members.
|
Public Member Functions |
|
| TWinAsyncSocket () |
| | Default constructor.
|
|
| ~TWinAsyncSocket () |
| | Destructor.
|
|
T * | Protocol () |
| | Returns a pointer to the protocol interface.
|
| virtual HANDLE | GetDataReadyHandle () |
| | Return a valid handle if you want to receive data tx messages.
|
| virtual BOOL | OnDataReady () |
| | Called when the event handle returned by GetDataReadyHandle() is set.
|
| virtual BOOL | OnRead (int nErr) |
| | Called when data has been received from connected socket.
|
| virtual BOOL | OnWrite (int nErr) |
| | Called when previously full transmit buffer is now empty.
|
Detailed Description
template<class T>
class TWinAsyncSocket< T >
Provides asynchronous socket communications.
This class derives from CWinAsyncSocket and provides an interface to CWinSocketProtocol derived classes. See CWinSocket for synchronous socket.
Example:
Member Function Documentation
|
template<class T> |
| virtual HANDLE TWinAsyncSocket< T >::GetDataReadyHandle |
( |
|
) |
[inline, virtual] |
|
|
|
Return a valid handle if you want to receive data tx messages.
- Returns:
- Waitable event handle
- See also:
Reimplemented from CWinAsyncSocket. |
|
template<class T> |
| virtual BOOL TWinAsyncSocket< T >::OnDataReady |
( |
|
) |
[inline, virtual] |
|
|
template<class T> |
| virtual BOOL TWinAsyncSocket< T >::OnRead |
( |
int |
nErr |
) |
[inline, virtual] |
|
|
|
Called when data has been received from connected socket.
- Parameters:
-
| [in] | nErr | - Zero if no error, otherwise socket error value. |
- Returns:
- Return non-zero if handled
Reimplemented from CWinAsyncSocket. |
|
template<class T> |
| virtual BOOL TWinAsyncSocket< T >::OnWrite |
( |
int |
nErr |
) |
[inline, virtual] |
|
|
|
Called when previously full transmit buffer is now empty.
- Parameters:
-
| [in] | nErr | - Zero if no error, otherwise socket error value. |
- Returns:
- Return non-zero if handled
Reimplemented from CWinAsyncSocket. |
The documentation for this class was generated from the following file:
|