| 52 | } |
| 53 | |
| 54 | void onReceived(const void* buffer, size_t size) override |
| 55 | { |
| 56 | _received += size; |
| 57 | while (_received >= message_to_send.size()) |
| 58 | { |
| 59 | SendMessage(); |
| 60 | _received -= message_to_send.size(); |
| 61 | } |
| 62 | |
| 63 | timestamp_stop = Timestamp::nano(); |
| 64 | total_bytes += size; |
| 65 | } |
| 66 | |
| 67 | void onError(int error, const std::string& category, const std::string& message) override |
| 68 | { |