Struct hyperlocal_with_windows::SocketIncoming
source · pub struct SocketIncoming { /* private fields */ }
Expand description
A stream of connections from binding to a socket.
Implementations§
source§impl SocketIncoming
impl SocketIncoming
sourcepub fn bind(path: impl AsRef<Path>) -> Result<Self, Error>
pub fn bind(path: impl AsRef<Path>) -> Result<Self, Error>
Creates a new SocketIncoming
binding to provided socket path.
Errors
Refer to tokio::net::Listener::bind
.
sourcepub fn from_listener(listener: UnixListener) -> Self
pub fn from_listener(listener: UnixListener) -> Self
Creates a new SocketIncoming
from Tokio’s UnixListener
ⓘ
let socket = SocketIncoming::from_listener(unix_listener);
let server = Server::builder(socket).serve(service);
Trait Implementations§
source§impl Accept for SocketIncoming
impl Accept for SocketIncoming
source§impl Debug for SocketIncoming
impl Debug for SocketIncoming
source§impl From<UnixListener> for SocketIncoming
impl From<UnixListener> for SocketIncoming
source§fn from(listener: UnixListener) -> Self
fn from(listener: UnixListener) -> Self
Converts to this type from the input type.