#include <KjClientConn.h>
Public Member Functions | |
KjClientConn (KjSslServer *_pServer, pthread_t *_pThread) | |
~KjClientConn () | |
void | NewClient () |
Waiting for new client request. | |
string & | ReadMsg () |
Read message from client. | |
void | WriteMsg (const string &_strMsg) |
Write message to the client. | |
KjSslConnection * | GetConn () |
Get SSL client connection. | |
pthread_t & | GetThreadId () |
Get or set connection thread index. | |
pthread_t * | GetThread () |
bool & | GetIsConnected () |
bool & | GetIsLockNewThread () |
bool & | GetCanRead () |
Private Member Functions | |
bool | ChatWithClient () |
Server chat with client. | |
void | ParseClientRequest (string &_strMsg) |
Parse client request and return server message. | |
void | DeleteEndMsg (string &_strMsg) |
Delete end message from string is message exists. | |
Private Attributes | |
KjSslServer * | m_pServer |
SSL server connection. | |
KjSslConnection * | m_pSslConn |
Pointer to client connection. | |
pthread_t | m_iThreadId |
Client connection thread index. | |
pthread_t * | m_pThread |
Thread pointer. | |
bool | m_bIsConnected |
Is client connected ? | |
bool | m_bIsLockNewThread |
Lock new thread? | |
string | m_strReadMsg |
Message readed from client. | |
string | m_strWriteMsg |
Message write to the client. | |
bool | m_bCanRead |
Can read message ? |
Definition at line 20 of file KjClientConn.h.
|
Definition at line 17 of file KjClientConn.cpp. References m_bCanRead, m_bIsConnected, m_bIsLockNewThread, m_pServer, m_pSslConn, m_pThread, m_strReadMsg, and m_strWriteMsg. Referenced by KjServerThread::CreateNewThread(). |
|
Definition at line 29 of file KjClientConn.cpp. |
|
Server chat with client.
Definition at line 58 of file KjClientConn.cpp. References m_pSslConn. Referenced by NewClient(). |
|
Delete end message from string is message exists.
Definition at line 35 of file KjClientConn.cpp. Referenced by ParseClientRequest(). |
|
Definition at line 70 of file KjClientConn.h. References m_bCanRead. |
|
Get SSL client connection.
Definition at line 44 of file KjClientConn.h. References m_pSslConn. |
|
Definition at line 60 of file KjClientConn.h. References m_bIsConnected. |
|
Definition at line 65 of file KjClientConn.h. References m_bIsLockNewThread. |
|
Definition at line 55 of file KjClientConn.h. References m_pThread. |
|
Get or set connection thread index.
Definition at line 50 of file KjClientConn.h. References m_iThreadId. |
|
Waiting for new client request.
Definition at line 117 of file KjClientConn.cpp. References ChatWithClient(), m_bIsConnected, m_bIsLockNewThread, m_iThreadId, m_pServer, m_pSslConn, and m_pThread. Referenced by KjServerThread::NewThread(). |
|
Parse client request and return server message.
Definition at line 47 of file KjClientConn.cpp. References DeleteEndMsg(), m_bCanRead, and m_strReadMsg. |
|
Read message from client.
Definition at line 148 of file KjClientConn.cpp. References m_bCanRead, m_strReadMsg, and m_strWriteMsg. |
|
Write message to the client.
Definition at line 158 of file KjClientConn.cpp. References m_pSslConn, m_strReadMsg, and m_strWriteMsg. |
|
Can read message ?
Definition at line 30 of file KjClientConn.h. Referenced by GetCanRead(), KjClientConn(), ParseClientRequest(), and ReadMsg(). |
|
Is client connected ?
Definition at line 26 of file KjClientConn.h. Referenced by GetIsConnected(), KjClientConn(), and NewClient(). |
|
Lock new thread?
Definition at line 27 of file KjClientConn.h. Referenced by GetIsLockNewThread(), KjClientConn(), and NewClient(). |
|
Client connection thread index.
Definition at line 24 of file KjClientConn.h. Referenced by GetThreadId(), and NewClient(). |
|
SSL server connection.
Definition at line 22 of file KjClientConn.h. Referenced by KjClientConn(), and NewClient(). |
|
Pointer to client connection.
Definition at line 23 of file KjClientConn.h. Referenced by ChatWithClient(), GetConn(), KjClientConn(), NewClient(), and WriteMsg(). |
|
Thread pointer.
Definition at line 25 of file KjClientConn.h. Referenced by GetThread(), KjClientConn(), and NewClient(). |
|
Message readed from client.
Definition at line 28 of file KjClientConn.h. Referenced by KjClientConn(), ParseClientRequest(), ReadMsg(), and WriteMsg(). |
|
Message write to the client.
Definition at line 29 of file KjClientConn.h. Referenced by KjClientConn(), ReadMsg(), and WriteMsg(). |