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

Method running

lib_acl_cpp/samples/socket/c2/main.cpp:21–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19 }
20
21 bool running(void)
22 {
23 acl::socket_stream* conn = new acl::socket_stream;
24 if (conn->open(addr_, 10, 10) == false)
25 {
26 printf("open %s error %s\r\n", addr_.c_str(),
27 acl::last_serror());
28 return false;
29 }
30
31 if (conn->puts("hello world1") == -1)
32 {
33 printf("write error\r\n");
34 delete conn;
35 return false;
36 }
37
38 acl::string buf;
39 if (conn->gets(buf, false) == false)
40 {
41 printf("gets error\r\n");
42 delete conn;
43 return false;
44 }
45
46 delete conn;
47 return true;
48 }
49
50private:
51 int max_;

Callers

nothing calls this directly

Calls 5

putsMethod · 0.80
getsMethod · 0.80
last_serrorFunction · 0.50
openMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected