Added callback to display player names of connected players.

This commit is contained in:
lotodore
2007-04-08 20:35:42 +00:00
parent e89b543a92
commit 07a0e01620
12 changed files with 32 additions and 8 deletions
+6 -1
View File
@@ -28,6 +28,7 @@
#include <net/connectdata.h>
#include <net/sessiondata.h>
#include <net/servercallback.h>
#define RECEIVER_THREAD_TERMINATE_TIMEOUT 200
@@ -43,13 +44,15 @@ class NetPacket;
class ServerRecvThread : public Thread
{
public:
ServerRecvThread();
ServerRecvThread(ServerCallback &gui);
virtual ~ServerRecvThread();
void SendToAllPlayers(boost::shared_ptr<NetPacket> packet);
void AddConnection(boost::shared_ptr<ConnectData> data);
void AddNotification(unsigned notification);
ServerCallback &GetCallback();
protected:
typedef std::deque<boost::shared_ptr<ConnectData> > ConnectQueue;
@@ -94,6 +97,8 @@ private:
std::auto_ptr<ServerSenderCallback> m_senderCallback;
ServerCallback &m_callback;
friend class ServerRecvStateInit;
};