| 71 | } |
| 72 | |
| 73 | void onStringMessage(const TcpConnectionPtr&, |
| 74 | const string& message, |
| 75 | Timestamp) |
| 76 | { |
| 77 | // printf("<<< %s\n", message.c_str()); |
| 78 | receiveTime_ = loop_->pollReturnTime(); |
| 79 | int received = g_messagesReceived.incrementAndGet(); |
| 80 | if (received == g_connections) |
| 81 | { |
| 82 | Timestamp endTime = Timestamp::now(); |
| 83 | LOG_INFO << "all received " << g_connections << " in " |
| 84 | << timeDifference(endTime, g_startTime); |
| 85 | g_loop->queueInLoop(g_statistic); |
| 86 | } |
| 87 | else if (received % 1000 == 0) |
| 88 | { |
| 89 | LOG_DEBUG << received; |
| 90 | } |
| 91 | } |
| 92 | |
| 93 | void send() |
| 94 | { |
nothing calls this directly
no test coverage detected