3 |
* LinuxSampler - modular, streaming capable sampler * |
* LinuxSampler - modular, streaming capable sampler * |
4 |
* * |
* * |
5 |
* Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck * |
* Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck * |
6 |
* Copyright (C) 2005 - 2008 Christian Schoenebeck * |
* Copyright (C) 2005 - 2009 Christian Schoenebeck * |
7 |
* * |
* * |
8 |
* This library is free software; you can redistribute it and/or modify * |
* This library is free software; you can redistribute it and/or modify * |
9 |
* it under the terms of the GNU General Public License as published by * |
* it under the terms of the GNU General Public License as published by * |
141 |
} |
} |
142 |
|
|
143 |
LSCPServer::~LSCPServer() { |
LSCPServer::~LSCPServer() { |
144 |
|
CloseAllConnections(); |
145 |
|
InstrumentManager::StopBackgroundThread(); |
146 |
#if defined(WIN32) |
#if defined(WIN32) |
147 |
if (hSocket >= 0) closesocket(hSocket); |
if (hSocket >= 0) closesocket(hSocket); |
148 |
#else |
#else |
626 |
NotifyMutex.Unlock(); |
NotifyMutex.Unlock(); |
627 |
} |
} |
628 |
|
|
629 |
|
void LSCPServer::CloseAllConnections() { |
630 |
|
std::vector<yyparse_param_t>::iterator iter = Sessions.begin(); |
631 |
|
while(iter != Sessions.end()) { |
632 |
|
CloseConnection(iter); |
633 |
|
iter = Sessions.begin(); |
634 |
|
} |
635 |
|
} |
636 |
|
|
637 |
void LSCPServer::LockRTNotify() { |
void LSCPServer::LockRTNotify() { |
638 |
RTNotifyMutex.Lock(); |
RTNotifyMutex.Lock(); |
639 |
} |
} |