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

Method on_connect

dlib/test/iosockstream.cpp:29–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27 class serv : public server_iostream
28 {
29 virtual void on_connect (
30 std::istream& in,
31 std::ostream& out,
32 const std::string& ,
33 const std::string& ,
34 unsigned short ,
35 unsigned short ,
36 uint64
37 )
38 {
39 try
40 {
41 dlog << LINFO << "serv1: serving connection";
42
43 std::string temp;
44 in >> temp;
45 DLIB_TEST(temp == "word");
46 in >> temp;
47 DLIB_TEST(temp == "another");
48 out << "yay words ";
49 in >> temp;
50 DLIB_TEST(temp == "yep");
51 }
52 catch (error& e)
53 {
54 error_string = e.what();
55 }
56
57 }
58
59
60 public:

Callers

nothing calls this directly

Calls 1

whatMethod · 0.45

Tested by

no test coverage detected