pub enum TcpCommand {
Bind {
addr: SocketAddr,
},
Connect {
addr: SocketAddr,
},
Send {
id: ConnId,
bytes: Vec<u8>,
},
Close {
id: ConnId,
},
Shutdown,
}Expand description
Commands sent into the TcpManager.
Variants§
Bind
Listen on addr. The kernel-assigned port flows back as
IoEvent::Bound { addr }.
Fields
§
addr: SocketAddrConnect
Initiate an outbound connection. On success a
IoEvent::Connected { id, peer } is published; subsequent
reads / writes use the same ConnId API as inbound.
Fields
§
addr: SocketAddrSend
Close
Shutdown
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TcpCommand
impl RefUnwindSafe for TcpCommand
impl Send for TcpCommand
impl Sync for TcpCommand
impl Unpin for TcpCommand
impl UnsafeUnpin for TcpCommand
impl UnwindSafe for TcpCommand
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