pub struct TcpForwarder { /* private fields */ }Expand description
Owns the accept-loop thread for a Vm::expose_tcp forwarder.
Drop this to stop accepting new connections. In-flight connections continue until they close naturally — they’re owned by their own splice threads, not by the forwarder.
Implementations§
Source§impl TcpForwarder
impl TcpForwarder
Sourcepub fn local_addr(&self) -> SocketAddr
pub fn local_addr(&self) -> SocketAddr
The address the forwarder is listening on. Useful when you
asked for host_port = 0 and want to know the OS-assigned
port.
Trait Implementations§
Source§impl Drop for TcpForwarder
impl Drop for TcpForwarder
Auto Trait Implementations§
impl !RefUnwindSafe for TcpForwarder
impl !UnwindSafe for TcpForwarder
impl Freeze for TcpForwarder
impl Send for TcpForwarder
impl Sync for TcpForwarder
impl Unpin for TcpForwarder
impl UnsafeUnpin for TcpForwarder
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