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

Method thread_on_read

lib_acl_cpp/samples/ssl/ssl_server2/master_service.cpp:109–133  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

107}
108
109bool master_service::thread_on_read(acl::socket_stream* conn)
110{
111 if (conf_ == NULL) {
112 return do_run(*conn, NULL);
113 }
114
115 acl::sslbase_io* ssl = setup_ssl(*conn, *conf_);
116 if (ssl == NULL) {
117 return false;
118 }
119
120 if (!ssl->handshake()) {
121 logger_error("ssl handshake failed");
122 return false;
123 }
124
125 if (!ssl->handshake_ok()) {
126 logger("handshake trying again...");
127 return true;
128 }
129
130 //logger("handshake_ok");
131
132 return do_run(*conn, ssl);
133}
134
135bool master_service::thread_on_accept(acl::socket_stream* conn)
136{

Callers

nothing calls this directly

Calls 3

do_runFunction · 0.70
setup_sslFunction · 0.70
handshakeMethod · 0.45

Tested by

no test coverage detected