MCPcopy Create free account
hub / github.com/acl-dev/acl / thread_on_read

Method thread_on_read

lib_acl_cpp/samples/ssl/ssl_server3/master_service.cpp:100–124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

98}
99
100bool master_service::thread_on_read(acl::socket_stream* conn)
101{
102 if (conf_ == NULL) {
103 return do_run(*conn, NULL);
104 }
105
106 acl::sslbase_io* ssl = setup_ssl(*conn, *conf_);
107 if (ssl == NULL) {
108 return false;
109 }
110
111 if (!ssl->handshake()) {
112 logger_error("ssl handshake failed");
113 return false;
114 }
115
116 if (!ssl->handshake_ok()) {
117 logger("handshake trying again...");
118 return true;
119 }
120
121 //logger("handshake_ok");
122
123 return do_run(*conn, ssl);
124}
125
126bool master_service::thread_on_accept(acl::socket_stream* conn)
127{

Callers

nothing calls this directly

Calls 3

do_runFunction · 0.70
setup_sslFunction · 0.70
handshakeMethod · 0.45

Tested by

no test coverage detected