| 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); |
nothing calls this directly
no test coverage detected