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

Method sio_check_pop3

lib_acl_cpp/samples/connect_manager/check_sync.cpp:12–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10}
11
12void check_sync::sio_check_pop3(acl::check_client& checker,
13 acl::socket_stream& conn)
14{
15 acl::string buf;
16 if (conn.gets(buf) == false)
17 {
18 checker.set_alive(false);
19 return;
20 }
21
22 if (strncasecmp(buf.c_str(), "+OK", 3) == 0)
23 {
24 printf(">>> SIO_CHECK SERVER(%s) OK: %s, len: %d <<<\r\n",
25 checker.get_addr(), buf.c_str(), (int) buf.length());
26 checker.set_alive(true);
27 }
28 else
29 {
30 printf(">>> SIO_CHECK SERVER(%s) ERROR: %s, len: %d <<<\r\n",
31 checker.get_addr(), buf.c_str(), (int) buf.length());
32 checker.set_alive(false);
33 }
34}
35
36void check_sync::sio_check_http(acl::check_client& checker,
37 acl::socket_stream& conn)

Callers 1

sio_checkMethod · 0.80

Calls 6

strncasecmpFunction · 0.85
getsMethod · 0.80
set_aliveMethod · 0.45
c_strMethod · 0.45
get_addrMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected