Added connected clients tracking to BlockingTCPAcceptor. For each new connection a new 'BlockingServerTCPTransport' object is created, but was never released.

The acceptor now stores all the objects in a set, and registers a callback with the client, to be notified when the connection is closed. On notification the client is them removed from the set and the memory is released.
When the acceptor is destroyed, it also closes and deleted all the connected clients.
This commit is contained in:
miha_vitorovic
2011-01-05 13:36:07 +01:00
parent dcc2c83336
commit 0af1781b5e
5 changed files with 79 additions and 11 deletions

View File

@@ -208,7 +208,8 @@ namespace epics {
}
void BlockingTCPTransport::internalClose(bool force) {
// noop
// close the socket
epicsSocketDestroy(_channel);
}
int BlockingTCPTransport::getSocketReceiveBufferSize() const {