KjServerTest Class Reference

#include <KjServerTest.h>

List of all members.

Public Member Functions

 KjServerTest ()
 ~KjServerTest ()
int Update ()

Private Member Functions

bool CanRead (const int _iClientId)
 Check if client can read.
const char * Read (const int _iClientId)
 Read message from client connection.
void Write (const int _iClientId, const char *_strMsg)
 Write message to the client connection.
int GetNumClients ()
 Get number of clients.
void Connect (char *_strConn, const char *_strCertFile, const char *_strKeyFile)
 Connect new ssl server.
int Start ()
void CreateNewThread ()
 Create new thread for new client connection.
void ConnectServer ()
 Connect server, set default parameters.

Static Private Member Functions

static void * NewThread (void *_pArg)

Private Attributes

KjServerThread * m_pServer
string m_strReadMsg
 Message readed from client.
string m_strWriteMsg
 Message write to the client.
bool m_bIsConnected
 Is ssl server connected ?


Detailed Description

Definition at line 78 of file KjServerTest.h.


Constructor & Destructor Documentation

KjServerTest::KjServerTest  ) 
 

Definition at line 36 of file KjServerTest.cpp.

References m_bIsConnected, m_pServer, m_strReadMsg, and m_strWriteMsg.

KjServerTest::~KjServerTest  ) 
 

Definition at line 45 of file KjServerTest.cpp.


Member Function Documentation

bool KjServerTest::CanRead const int  _iClientId  )  [private]
 

Check if client can read.

Return values:
bool True if client can read

Definition at line 52 of file KjServerTest.cpp.

References m_pServer.

Referenced by Update().

void KjServerTest::Connect char *  _strConn,
const char *  _strCertFile,
const char *  _strKeyFile
[private]
 

Connect new ssl server.

Parameters:
_strConn Connection IP adress and port
_strCertFile Certificate file
_strKeyFile RSA private key file

Definition at line 128 of file KjServerTest.cpp.

References m_pServer.

Referenced by ConnectServer().

void KjServerTest::ConnectServer  )  [private]
 

Connect server, set default parameters.

Definition at line 135 of file KjServerTest.cpp.

References Connect(), and m_bIsConnected.

Referenced by Update().

void KjServerTest::CreateNewThread  )  [private]
 

Create new thread for new client connection.

Definition at line 173 of file KjServerTest.cpp.

References NewThread().

Referenced by Update().

int KjServerTest::GetNumClients  )  [private]
 

Get number of clients.

Definition at line 119 of file KjServerTest.cpp.

References m_pServer.

Referenced by Update().

void * KjServerTest::NewThread void *  _pArg  )  [static, private]
 

Definition at line 159 of file KjServerTest.cpp.

References Start().

Referenced by CreateNewThread().

const char * KjServerTest::Read const int  _iClientId  )  [private]
 

Read message from client connection.

Definition at line 75 of file KjServerTest.cpp.

References m_pServer, and m_strReadMsg.

Referenced by Update().

int KjServerTest::Start  )  [private]
 

Definition at line 142 of file KjServerTest.cpp.

References m_pServer.

Referenced by NewThread().

int KjServerTest::Update  ) 
 

Definition at line 182 of file KjServerTest.cpp.

References CanRead(), ConnectServer(), CreateNewThread(), GetNumClients(), m_bIsConnected, Read(), and Write().

Referenced by main().

void KjServerTest::Write const int  _iClientId,
const char *  _strMsg
[private]
 

Write message to the client connection.

Definition at line 97 of file KjServerTest.cpp.

References m_pServer, and m_strWriteMsg.

Referenced by Update().


Member Data Documentation

bool KjServerTest::m_bIsConnected [private]
 

Is ssl server connected ?

Definition at line 84 of file KjServerTest.h.

Referenced by ConnectServer(), KjServerTest(), and Update().

KjServerThread* KjServerTest::m_pServer [private]
 

Definition at line 81 of file KjServerTest.h.

Referenced by CanRead(), Connect(), GetNumClients(), KjServerTest(), Read(), Start(), and Write().

string KjServerTest::m_strReadMsg [private]
 

Message readed from client.

Definition at line 82 of file KjServerTest.h.

Referenced by KjServerTest(), and Read().

string KjServerTest::m_strWriteMsg [private]
 

Message write to the client.

Definition at line 83 of file KjServerTest.h.

Referenced by KjServerTest(), and Write().


The documentation for this class was generated from the following files:
Generated on Tue Jul 24 10:03:56 2007 for Servertest by  doxygen 1.4.6