Return the bound TCP address, if this server is using TCP.
(&self)
| 65 | |
| 66 | /// Return the bound TCP address, if this server is using TCP. |
| 67 | pub fn tcp_addr(&self) -> Option<SocketAddr> { |
| 68 | match self.endpoint { |
| 69 | ServerEndpoint::Tcp(addr) => Some(addr), |
| 70 | #[cfg(unix)] |
| 71 | ServerEndpoint::Unix(_) => None, |
| 72 | } |
| 73 | } |
| 74 | |
| 75 | /// Return the Unix-domain socket path, if this server is using UDS. |
| 76 | #[cfg(unix)] |
no outgoing calls
no test coverage detected