From c82c636d8c9ac24c1e73740c35b3a93525783a3d Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Wed, 8 Feb 2012 10:02:46 +0000 Subject: cSocketThreads plugged in for cClientHandle reading. Sending still kept the old way. Please help me test this commit thoroughly, this is a change that can break on subtleties. git-svn-id: http://mc-server.googlecode.com/svn/trunk@244 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/cServer.h | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) (limited to 'source/cServer.h') diff --git a/source/cServer.h b/source/cServer.h index db60a2742..b56047487 100644 --- a/source/cServer.h +++ b/source/cServer.h @@ -1,9 +1,30 @@ +// cServer.h + +// Interfaces to the cServer object representing the network server + + + + + #pragma once +#ifndef CSERVER_H_INCLUDED +#define CSERVER_H_INCLUDED + +#include "cSocketThreads.h" + + + + class cPlayer; class cClientHandle; class cPacket; + + + + + class cServer //tolua_export { //tolua_export public: //tolua_export @@ -34,13 +55,20 @@ public: //tolua_export static void ServerListenThread( void* a_Args ); const AString & GetServerID(void) const; + + void ClientDestroying(const cClientHandle * a_Client); // Called by cClientHandle::Destroy(); removes the client from m_SocketThreads + private: + friend class cRoot; // so cRoot can create and destroy cServer + cServer(); ~cServer(); struct sServerState; sServerState* m_pState; + + cSocketThreads m_SocketThreads; // Time since server was started float m_Millisecondsf; @@ -51,3 +79,13 @@ private: bool m_bRestarting; }; //tolua_export + + + + + +#endif // CSERVER_H_INCLUDED + + + + -- cgit v1.2.3