| 34 | } |
| 35 | |
| 36 | void OnMessage(const Handle& handle, base::CBuffer* data, uint32_t, uint32_t error) { |
| 37 | char buff[65535]; |
| 38 | if (error == CEC_SUCCESS) { |
| 39 | while (data->GetCanReadLength()) { |
| 40 | int ret = data->Read(buff, 65535); |
| 41 | handle->Write(buff, ret); |
| 42 | } |
| 43 | |
| 44 | } else { |
| 45 | std::cout << " something error while reading. err : " << error << std::endl; |
| 46 | } |
| 47 | } |
| 48 | |
| 49 | int main() { |
| 50 | cppnet::CCppNet net; |
nothing calls this directly
no test coverage detected