summaryrefslogtreecommitdiffstats
path: root/source/cServer.h
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-02-26 13:55:42 +0100
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-02-26 13:55:42 +0100
commit7268a70902b04e098b6b530986d9ce6d210fdd07 (patch)
tree4c4a28b6e5fa03a58f3a787505bb02eca200082e /source/cServer.h
parentUsing cSocketThreads for client outgoing packets. Unfortunately had to put in one intermediate thread (cServer::cNotifyWriteThread) to avoid deadlocks. Still, seems we have a proper multithreading for clients and no more per-client threads, yay :) (diff)
downloadcuberite-7268a70902b04e098b6b530986d9ce6d210fdd07.tar
cuberite-7268a70902b04e098b6b530986d9ce6d210fdd07.tar.gz
cuberite-7268a70902b04e098b6b530986d9ce6d210fdd07.tar.bz2
cuberite-7268a70902b04e098b6b530986d9ce6d210fdd07.tar.lz
cuberite-7268a70902b04e098b6b530986d9ce6d210fdd07.tar.xz
cuberite-7268a70902b04e098b6b530986d9ce6d210fdd07.tar.zst
cuberite-7268a70902b04e098b6b530986d9ce6d210fdd07.zip
Diffstat (limited to '')
-rw-r--r--source/cServer.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/cServer.h b/source/cServer.h
index 200f2bb1f..5e21dbf37 100644
--- a/source/cServer.h
+++ b/source/cServer.h
@@ -58,7 +58,7 @@ public: //tolua_export
const AString & GetServerID(void) const;
- void ClientDestroying(const cClientHandle * a_Client); // Called by cClientHandle::Destroy(); removes the client from m_SocketThreads
+ void ClientDestroying(const cClientHandle * a_Client); // Called by cClientHandle::Destroy(); stop m_SocketThreads from calling back into a_Client
void NotifyClientWrite(const cClientHandle * a_Client); // Notifies m_SocketThreads that client has something to be written
@@ -66,6 +66,8 @@ public: //tolua_export
void QueueClientClose(const cSocket * a_Socket); // Queues the socket to close when all its outgoing data is sent
+ void RemoveClient(const cSocket * a_Socket); // Removes the socket from m_SocketThreads
+
private:
friend class cRoot; // so cRoot can create and destroy cServer