CMessengerClientSocket

Back to Classes Page

Parent Class: CSocket

Each object of this class serves a single client. Message packets are transferred between clients and server using these sockets. The number of Client Sockets existing at the server end is always equal to the total number of clients connected at that time. Each client also has 1 client socket at its end. A client socket object is created at the server end, when the Server Socket receives a connection request from client.

Field Summary

Access Data Type Name
public CCommonDialogElements * m_pParent

Constructor Summary

CMessengerClientSocket()
CMessengerClientSocket(CCommonDialogElements *parent)

Destructor Summary

~CMessengerClientSocket()

Method Summary

virtual void OnReceive(int nErrorCode)

Field Detail

m_pParent
Document pointer. Document object acts as a parent (controller) of each client socket.

Constructor Detail

CMessengerClientSocket()
Default Constructor. DON'T USE IT.

CMessengerClientSocket(CCommonDialogElements *parent)
Use only this constructor. It sets the Doc pointer as the parent of this socket.

Destructor Detail

~CMessengerClientSocket()
Default Destructor.

Method Detail

OnReceive(int nErrorCode)
Called automatically when data arrives on the socket. This method sends the incoming message packet to the document object for processing.


Back to Classes Page