Serial Framework C++ Edition
|
The base class for the server client connection that requires data exchange with a remote device. More...
#include <wclConnections.h>
Public Member Functions | |
CwclServerClientDataConnection () | |
Creates a new server client data connection. | |
int | GetReadBufferSize (unsigned long &Size) |
Reads the read buffer size. | |
int | GetWriteBufferSize (unsigned long &Size) |
Reads the write buffer size. | |
int | SetReadBufferSize (const unsigned long Size) |
Sets the read buffer size. | |
int | SetWriteBufferSize (const unsigned long Size) |
Sets the write buffer size. | |
int | Write (const void *const Data, const unsigned long Size, unsigned long &Written) |
Sends data to the connected device. | |
CwclCustomServerClientDataProcessor * | GetProcessor () const |
Gets the current Data Processor object assigned to the Connection. | |
__declspec (property(get=GetProcessor)) CwclCustomServerClientDataProcessor *Processor | |
Gets the current Data Processor object assigned to the Connection. | |
__event void | OnData (void *Sender, const void *const Data, const unsigned long Size) |
The event fires when new data is received from the connected remote device. | |
Public Member Functions inherited from CwclServerClientConnection | |
CwclServerClientConnection () | |
Creates a new server client connection. | |
virtual | ~CwclServerClientConnection () |
Frees the connection. | |
int | Disconnect () |
Disconnects from the connected remote device. | |
CwclServerConnection * | GetServer () const |
Gets the client owner. | |
__declspec (property(get=GetServer)) CwclServerConnection *Server | |
__event void | OnConnect (void *Sender, const int Error) |
The event fires when a connection to a remote device has been completed (with or without success). | |
__event void | OnDisconnect (void *Sender, const int Reason) |
The event fires when the remote connected device has been disconnected. | |
Public Member Functions inherited from CwclCustomConnection | |
CwclCustomConnection () | |
Creates a new connection. | |
virtual | ~CwclCustomConnection () |
Frees the connection. | |
CwclMessageReceiver * | GetReceiver () const |
Gets the connection message receiver object. | |
__declspec (property(get=GetReceiver)) CwclMessageReceiver *Receiver | |
Gets the connection message receiver object. | |
DWORD | GetThreadId () const |
Gets the connection's thread ID. | |
__declspec (property(get=GetThreadId)) DWORD ThreadId | |
Gets the connection's thread ID. | |
Protected Member Functions | |
void | NotifyDataReceived (const void *const Data, const unsigned long Size) |
Send a data notification message. | |
virtual void | MessageReceived (const CwclMessage *const Message) override |
The message receiver calls this method when a new notification message has been received. | |
virtual int | Accept (CwclServerConnection *const Server, const void *const Params, const unsigned long ParamsSize) override |
The method accepts the client connection request. | |
virtual void | DoData (const void *const Data, const unsigned long Size) |
Fires the OnData event. | |
virtual int | HalGetReadBufferSize (unsigned long &Size)=0 |
Reads the read buffer size. | |
virtual int | HalGetWriteBufferSize (unsigned long &Size)=0 |
Reads the write buffer size. | |
virtual int | HalSetReadBufferSize (const unsigned long Size)=0 |
Sets the read buffer size. | |
virtual int | HalSetWriteBufferSize (const unsigned long Size)=0 |
Sets the write buffer size. | |
virtual int | HalWrite (const void *const Data, const unsigned long Size, unsigned long &Written)=0 |
Implements a hardware-dependent code that sends data to the connected device. | |
Protected Member Functions inherited from CwclServerClientConnection | |
void | NotifyClosed (const int Reason) |
Send a Disconnect notification message. | |
virtual void | MessageReceived (const CwclMessage *const Message) override |
The message receiver calls this method when a new notification message has been received. | |
virtual void | DoConnect (const int Error) |
Fires the OnConnect event. | |
virtual void | DoDisconnect (const int Reason) |
Fires the OnDisconnect event. | |
virtual int | Accept (CwclServerConnection *const Server, const void *const Params, const unsigned long ParamsSize) |
The method accepts the client connection request. | |
virtual int | HalAccept ()=0 |
Hardware-dependent method that prepares to communicate with a connected remote client device. | |
virtual int | HalCommunicate (const HANDLE Event) |
Implements a hardware-dependent code that communicate with the connected remote device. | |
virtual int | HalDisconnect ()=0 |
Implements a hardware-dependent code that disconnects from the connected remote device. | |
bool | GetDisconnected () const |
Gets the connection state. | |
__declspec (property(get=GetDisconnected)) bool Disconnected | |
Gets the connection state. | |
void * | GetParams () const |
Custom connection parameters. | |
__declspec (property(get=GetParams)) void *Params | |
Protected Member Functions inherited from CwclCustomConnection | |
virtual void | MessageReceived (const CwclMessage *const Message) |
The message receiver calls this method when a new notification message has been received. | |
void | Enter () |
Enters the connection's critical section. | |
void | Leave () |
Exists *leaves) the connection's critical section. | |
The base class for the server client connection that requires data exchange with a remote device.