141 |
} |
} |
142 |
|
|
143 |
LSCPServer::~LSCPServer() { |
LSCPServer::~LSCPServer() { |
144 |
|
CloseAllConnections(); |
145 |
#if defined(WIN32) |
#if defined(WIN32) |
146 |
if (hSocket >= 0) closesocket(hSocket); |
if (hSocket >= 0) closesocket(hSocket); |
147 |
#else |
#else |
625 |
NotifyMutex.Unlock(); |
NotifyMutex.Unlock(); |
626 |
} |
} |
627 |
|
|
628 |
|
void LSCPServer::CloseAllConnections() { |
629 |
|
std::vector<yyparse_param_t>::iterator iter = Sessions.begin(); |
630 |
|
while(iter != Sessions.end()) { |
631 |
|
CloseConnection(iter); |
632 |
|
iter = Sessions.begin(); |
633 |
|
} |
634 |
|
} |
635 |
|
|
636 |
void LSCPServer::LockRTNotify() { |
void LSCPServer::LockRTNotify() { |
637 |
RTNotifyMutex.Lock(); |
RTNotifyMutex.Lock(); |
638 |
} |
} |