1
0
forked from 0ad/0ad
0ad/source/ps/Network/ServerSocket.cpp
janwas a69ac0dee9 - fix w4 warnings
- add convenience macros for config_db(CFG_GET_SYS_VAL)
- VFSUtil::EnumDirEnts now uses flags instead of bool recursive
- UNUSED() for params, UNUSED2 (<- need better name) for variables
- config.h defines must be tested with #if (always defined) -> allows
detecting misspellings thanks to compiler warnings
- replace debug_assert(0) with debug_warn (its sole purpose)
- replace ScriptingHost::ValueToInt et al with ToPrimitive
- use nommgr.h to disable both mmgr and VC debug heap

This was SVN commit r2585.
2005-08-09 15:55:44 +00:00

32 lines
569 B
C++
Executable File

#include "precompiled.h"
#include "Network.h"
#include "NetLog.h"
CServerSocket::~CServerSocket()
{
}
void CServerSocket::OnRead()
{
CSocketAddress remoteAddr;
PS_RESULT res=PreAccept(remoteAddr);
if (res==PS_OK)
{
OnAccept(remoteAddr);
}
else
{
// All errors are non-critical, so no need to do anything special besides
// not calling OnAccept [ shouldn't be, that is ;-) ]
NET_LOG("CServerSocket::OnRead(): PreAccept returned an error: %s", res);
}
}
void CServerSocket::OnWrite()
{}
void CServerSocket::OnClose(PS_RESULT UNUSED(errorCode))
{}