MCPcopy Create free account
hub / github.com/DeNA/HandlerSocket-Plugin-for-MySQL / set

Method set

libhsclient/socket.cpp:31–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29}
30
31void
32socket_args::set(const config& conf)
33{
34 timeout = conf.get_int("timeout", 600);
35 listen_backlog = conf.get_int("listen_backlog", 256);
36 std::string node = conf.get_str("host", "");
37 std::string port = conf.get_str("port", "");
38 if (!node.empty() || !port.empty()) {
39 if (family == AF_UNIX || node == "/") {
40 set_unix_domain(port.c_str());
41 } else {
42 const char *nd = node.empty() ? 0 : node.c_str();
43 if (resolve(nd, port.c_str()) != 0) {
44 fatal_exit("getaddrinfo failed: " + node + ":" + port);
45 }
46 }
47 }
48 sndbuf = conf.get_int("sndbuf", 0);
49 rcvbuf = conf.get_int("rcvbuf", 0);
50}
51
52void
53socket_args::set_unix_domain(const char *path)

Callers 4

hstcpcli_mainFunction · 0.80
runMethod · 0.80
hstest_mainFunction · 0.80
hstcpsvrMethod · 0.80

Calls 4

fatal_exitFunction · 0.85
get_intMethod · 0.80
get_strMethod · 0.80
emptyMethod · 0.80

Tested by 1

hstest_mainFunction · 0.64