pub struct ClientListener { /* private fields */ }Expand description
The client’s sockets, bound and waiting for the engines.
Binding first lets a launcher bind tcp://<host>:0, read the port the OS
chose from ClientListener::handshake_address, and start the engines
with it.
Implementations§
Source§impl ClientListener
impl ClientListener
Sourcepub async fn bind(config: ClientConfig) -> Result<Self>
pub async fn bind(config: ClientConfig) -> Result<Self>
Bind the handshake, input and output sockets.
Sourcepub fn handshake_address(&self) -> &str
pub fn handshake_address(&self) -> &str
The handshake address the engines must dial, as bound.
Sourcepub async fn accept(self) -> Result<EngineClient>
pub async fn accept(self) -> Result<EngineClient>
Wait until every engine has registered, within the configured handshake timeout.
Must be called within a Tokio runtime; the client’s background tasks run on it.
Auto Trait Implementations§
impl !RefUnwindSafe for ClientListener
impl !UnwindSafe for ClientListener
impl Freeze for ClientListener
impl Send for ClientListener
impl Sync for ClientListener
impl Unpin for ClientListener
impl UnsafeUnpin for ClientListener
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more