managed secure socket allocation and deallocation #4313

This commit is contained in:
XinyuHou 2015-01-28 13:07:03 +00:00
parent d80aa7c938
commit 622e40e5d7
20 changed files with 119 additions and 48 deletions

View file

@ -21,6 +21,7 @@
#include "server/ClientProxy.h"
#include "server/ClientProxyUnknown.h"
#include "server/PrimaryClient.h"
#include "server/ClientListener.h"
#include "synergy/IPlatformScreen.h"
#include "synergy/DropHelper.h"
#include "synergy/option_types.h"
@ -30,6 +31,8 @@
#include "synergy/FileChunker.h"
#include "synergy/KeyState.h"
#include "synergy/Screen.h"
#include "synergy/PacketStreamFilter.h"
#include "net/TCPSocket.h"
#include "net/IDataSocket.h"
#include "net/IListenSocket.h"
#include "net/XSocket.h"
@ -1358,7 +1361,11 @@ Server::handleClientDisconnected(const Event&, void* vclient)
BaseClientProxy* client = reinterpret_cast<BaseClientProxy*>(vclient);
removeActiveClient(client);
removeOldClient(client);
PacketStreamFilter* streamFileter = dynamic_cast<PacketStreamFilter*>(client->getStream());
TCPSocket* socket = dynamic_cast<TCPSocket*>(streamFileter->getStream());
delete client;
m_clientListener->deleteSocket(socket);
}
void