MCPcopy Create free account
hub / github.com/apache/impala / bind_addr

Method bind_addr

be/src/kudu/rpc/rpc-test.cc:121–131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

119 return std::get<1>(GetParam());
120 }
121 Sockaddr bind_addr() const {
122 if (use_unix_socket()) {
123 // Ensure multiple calls to bind_addr work by unlinking the socket file.
124 // The only way to reuse a socket file is to remove it with unlink().
125 unlink(socket_path_.c_str());
126 Sockaddr addr;
127 CHECK_OK(addr.ParseUnixDomainPath(socket_path_));
128 return addr;
129 }
130 return Sockaddr::Wildcard();
131 }
132 static string expected_remote_str(const Sockaddr& bound_addr) {
133 if (bound_addr.is_ip()) {
134 return Substitute("$0 ($1)", bound_addr.ToString(), kRemoteHostName);

Callers

nothing calls this directly

Calls 2

unlinkFunction · 0.85
ParseUnixDomainPathMethod · 0.80

Tested by

no test coverage detected