2004-07-04 17:41:17 +02:00
|
|
|
#include "precompiled.h"
|
|
|
|
|
2003-11-25 03:11:50 +01:00
|
|
|
#include "Network.h"
|
2005-01-17 05:52:02 +01:00
|
|
|
#include "CLogger.h"
|
2003-11-25 03:11:50 +01:00
|
|
|
|
|
|
|
CServerSocket::~CServerSocket()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void CServerSocket::OnRead()
|
|
|
|
{
|
2004-03-08 03:08:12 +01:00
|
|
|
CSocketAddress remoteAddr;
|
2003-11-25 03:11:50 +01:00
|
|
|
|
|
|
|
PS_RESULT res=PreAccept(remoteAddr);
|
|
|
|
if (res==PS_OK)
|
|
|
|
{
|
|
|
|
OnAccept(remoteAddr);
|
|
|
|
}
|
2005-01-17 05:52:02 +01:00
|
|
|
else
|
|
|
|
{
|
|
|
|
// All errors are non-critical, so no need to do anything special besides
|
|
|
|
// not calling OnAccept [ shouldn't be, that is ;-) ]
|
|
|
|
LOG(NORMAL, LOG_CAT_NET, "CServerSocket::OnRead(): PreAccept returned an error: %s", res);
|
|
|
|
}
|
2003-11-25 03:11:50 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void CServerSocket::OnWrite()
|
|
|
|
{}
|
|
|
|
|
|
|
|
void CServerSocket::OnClose(PS_RESULT errorCode)
|
|
|
|
{}
|