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

Method resolve

libhsclient/socket.cpp:63–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61}
62
63int
64socket_args::resolve(const char *node, const char *service)
65{
66 const int flags = (node == 0) ? AI_PASSIVE : 0;
67 auto_addrinfo ai;
68 addr = sockaddr_storage();
69 addrlen = 0;
70 const int r = ai.resolve(node, service, flags, family, socktype, protocol);
71 if (r != 0) {
72 return r;
73 }
74 memcpy(&addr, ai.get()->ai_addr, ai.get()->ai_addrlen);
75 addrlen = ai.get()->ai_addrlen;
76 return 0;
77}
78
79int
80socket_set_options(auto_file& fd, const socket_args& args, std::string& err_r)

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected