| 57 | } |
| 58 | |
| 59 | void write_thread ( |
| 60 | ) |
| 61 | { |
| 62 | try |
| 63 | { |
| 64 | std::unique_ptr<connection> con(get_connection()); |
| 65 | |
| 66 | // Send a copy of the data down the connection so we can test our the read() function |
| 67 | // that uses timeouts in the main thread. |
| 68 | if (con->write(data_to_send.data(), data_to_send.size()) != (int)data_to_send.size()) |
| 69 | { |
| 70 | test_failed = true; |
| 71 | dlog << LERROR << "failed to send all the data down the connection"; |
| 72 | } |
| 73 | |
| 74 | close_gracefully(con,300000); |
| 75 | } |
| 76 | catch (exception& e) |
| 77 | { |
| 78 | test_failed = true; |
| 79 | dlog << LERROR << e.what(); |
| 80 | } |
| 81 | } |
| 82 | |
| 83 | void no_write_thread ( |
| 84 | ) |
nothing calls this directly
no test coverage detected