#include <string_socket.h>
CHost::CHost | ( | bool | bDoubleMessage, | |
ProtocolDensityEnum | pdProtocolDensity | |||
) |
References m_bDoubleMessage, m_ListenSocket, m_LogFunction, m_pdProtocolDensity, and m_Port.
void CHost::AnswerByRequest | ( | int | rConnectedSocket, | |
const struct sockaddr_in * | client_addr, | |||
int | TimeOut, | |||
bool & | bCloseSocket | |||
) | [private] |
References DDCCloseSocketString, Format(), GetNetworkErrorString(), m_CorporaName, m_LogFunction, m_pdProtocolDensity, neSuccess, pdHeavyDensity, ProcessSocketString(), RecieveString(), and SendString().
Referenced by RunThread().
string CHost::ProcessSocketString | ( | const string & | S, | |
int | rConnectedSocket | |||
) | [protected, virtual] |
Reimplemented in CDDCCorpusListenHost, and CDDCServerListenHost.
Referenced by AnswerByRequest().
bool CHost::ReadFromString | ( | string | S | ) |
References m_CorporaName, m_HostName, m_LocalPath, m_Port, and Trim().
Referenced by LoadHosts().
void CHost::CreateListener | ( | ) |
References Format(), GetAddressStr(), ListenerThread(), m_CorporaName, and m_LogFunction.
Referenced by LoadDDCServer().
void CHost::CopyAddressParametersFrom | ( | const CHost & | X | ) |
References m_CorporaName, m_HostName, m_LocalPath, and m_Port.
Referenced by LoadDDCServer(), LoadLocalCorpora(), and ReloadCorpus().
void CHost::StopAcceptingThread | ( | ) |
References CloseSocket(), and m_ListenSocket.
Referenced by CDDCCorpusListenHost::~CDDCCorpusListenHost(), and CDDCServerListenHost::~CDDCServerListenHost().
void CHost::RunThread | ( | ) |
References AnswerByRequest(), CloseSocket(), create_socket(), Format(), GetAddressStr(), m_bDoubleMessage, m_CorporaName, m_HostName, m_ListenSocket, m_LogFunction, m_Port, SetSocketRecieveBuffer(), and SOCKET.
Referenced by ListenerThread().
int CHost::CreateAndConnectSocket | ( | string & | strError | ) | const |
References create_socket(), m_HostName, and m_Port.
Referenced by CDDCServerListenHost::GetFirstHitsFromCorpora().
string CHost::GetAddressStr | ( | ) | const |
References Format(), m_HostName, and m_Port.
Referenced by CreateListener(), CDDCServerListenHost::GetFirstHitsFromCorpora(), CDDCServerListenHost::GetHitStringsFromOneCorpora(), and RunThread().
const string & CHost::GetLocalPathOfIndex | ( | ) | const |
References m_LocalPath.
Referenced by CDDCCorpusListenHost::LoadHolder(), and ReloadCorpus().
string CHost::m_HostName [private] |
Referenced by CopyAddressParametersFrom(), CreateAndConnectSocket(), GetAddressStr(), ReadFromString(), and RunThread().
int CHost::m_Port [private] |
Referenced by CHost(), CopyAddressParametersFrom(), CreateAndConnectSocket(), GetAddressStr(), ReadFromString(), and RunThread().
int CHost::m_ListenSocket [private] |
Referenced by CHost(), RunThread(), and StopAcceptingThread().
bool CHost::m_bDoubleMessage [private] |
Referenced by CHost(), and RunThread().
string CHost::m_LocalPath [private] |
Referenced by CopyAddressParametersFrom(), GetLocalPathOfIndex(), and ReadFromString().
Referenced by AnswerByRequest(), and CHost().
string CHost::m_CorporaName |
Referenced by AnswerByRequest(), CopyAddressParametersFrom(), CreateListener(), CDDCServerListenHost::ProcessSocketString(), ReadFromString(), CDDCServerListenHost::ReadPossibleHosts(), CDDCServerListenHost::ReloadCorpusProcessSignal(), CDDCServerListenHost::ReplaceHolderIfNeeded(), and RunThread().
void(* CHost::m_LogFunction)(const string &) |