| 38 | |
| 39 | private: |
| 40 | void onConnection(const TcpConnectionPtr& conn) |
| 41 | { |
| 42 | LOG_INFO << conn->peerAddress().toIpPort() << " -> " |
| 43 | << conn->localAddress().toIpPort() << " is " |
| 44 | << (conn->connected() ? "UP" : "DOWN"); |
| 45 | |
| 46 | MutexLockGuard lock(mutex_); |
| 47 | if (conn->connected()) |
| 48 | { |
| 49 | connections_.insert(conn); |
| 50 | } |
| 51 | else |
| 52 | { |
| 53 | connections_.erase(conn); |
| 54 | } |
| 55 | } |
| 56 | |
| 57 | void onStringMessage(const TcpConnectionPtr&, |
| 58 | const string& message, |