MCPcopy Create free account
hub / github.com/davisking/dlib / write_thread

Method write_thread

dlib/test/sockets2.cpp:59–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 )

Callers

nothing calls this directly

Calls 5

close_gracefullyFunction · 0.85
writeMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45
whatMethod · 0.45

Tested by

no test coverage detected