1 | //! Unix domain socket helpers. |
---|---|
2 | |
3 | use super::Listener; |
4 | use std::io::Result; |
5 | use std::task::{Context, Poll}; |
6 | |
7 | impl Listener for tokio::net::UnixListener { |
8 | type Io = tokio::net::UnixStream; |
9 | type Addr = tokio::net::unix::SocketAddr; |
10 | |
11 | fn poll_accept(&mut self, cx: &mut Context<'_>) -> Poll<Result<(Self::Io, Self::Addr)>> { |
12 | Self::poll_accept(self, cx) |
13 | } |
14 | |
15 | fn local_addr(&self) -> Result<Self::Addr> { |
16 | self.local_addr().map(Into::into) |
17 | } |
18 | } |
19 |