mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-25 11:53:24 +00:00
# move ps/Network into top level project (and static lib).
This was SVN commit r4249.
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
#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))
|
||||
{}
|
||||
Reference in New Issue
Block a user