| 60 | } |
| 61 | |
| 62 | void SocketManager::stop() { |
| 63 | if (!Startable::running()) |
| 64 | return; |
| 65 | TaskHandler::stop(); |
| 66 | _initSignal.wait(); |
| 67 | |
| 68 | #if defined(_WIN32) |
| 69 | if (_eventSystem > 0) |
| 70 | PostMessage(_eventSystem, WM_QUIT, 0, 0); |
| 71 | #else |
| 72 | if (_eventSystem > 0) |
| 73 | ::close(_eventFD); |
| 74 | #endif |
| 75 | Startable::stop(); |
| 76 | } |
| 77 | |
| 78 | |
| 79 |