One sender thread per client. Requires loads of resources. Kind of hacked, because the internal dependencies are very ugly now. Requires loads of testing. A problem might be the last packet sent by the server to a specific client before closing the connection, for example an error message. It might never even reach the client, because the sender thread is terminated before. I have not yet found a good way to fix this.
This commit is contained in:
@@ -114,7 +114,6 @@ protected:
|
||||
ClientState &GetState();
|
||||
void SetState(ClientState &newState);
|
||||
|
||||
SenderThread &GetSender();
|
||||
ReceiverHelper &GetReceiver();
|
||||
|
||||
void SetGameId(unsigned id);
|
||||
@@ -167,12 +166,10 @@ private:
|
||||
mutable boost::mutex m_outPacketListMutex;
|
||||
|
||||
boost::shared_ptr<ClientContext> m_context;
|
||||
boost::shared_ptr<ClientSenderCallback> m_senderCallback;
|
||||
ClientState *m_curState;
|
||||
GuiInterface &m_gui;
|
||||
AvatarManager &m_avatarManager;
|
||||
|
||||
boost::shared_ptr<SenderThread> m_sender;
|
||||
boost::shared_ptr<ReceiverHelper> m_receiver;
|
||||
|
||||
GameData m_gameData;
|
||||
|
||||
Reference in New Issue
Block a user