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

Method running

lib_acl_cpp/samples/socket/c3/main.cpp:19–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17 }
18
19 bool running(void)
20 {
21 acl::socket_stream* conn = new acl::socket_stream;
22 if (conn->open(addr_, 10, 10) == false)
23 {
24 printf("open %s error %s\r\n", addr_.c_str(),
25 acl::last_serror());
26 return false;
27 }
28
29 char buf[8192];
30 while (!conn->eof()) {
31 int ret = conn->read(buf, sizeof(buf), false);
32 if (ret == -1) {
33 break;
34 }
35 }
36
37 delete conn;
38 return true;
39 }
40
41private:
42 acl::string addr_;

Callers

nothing calls this directly

Calls 5

last_serrorFunction · 0.50
openMethod · 0.45
c_strMethod · 0.45
eofMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected