pub enum ServerCommand {
Stop,
Send {
client_id: usize,
data: Vec<u8>,
},
SendAll {
data: Vec<u8>,
},
GetAddr,
GetClientAddr {
client_id: usize,
},
RemoveClient {
client_id: usize,
},
}
Expand description
A command sent from the server handle to the background server task.
Variants§
Stop
Stop the server.
Send
Send data to a client.
SendAll
Send data to all clients.
GetAddr
Get the local server address.
GetClientAddr
Get the address of a client.
RemoveClient
Disconnect a client from the server.
Auto Trait Implementations§
impl Freeze for ServerCommand
impl RefUnwindSafe for ServerCommand
impl Send for ServerCommand
impl Sync for ServerCommand
impl Unpin for ServerCommand
impl UnwindSafe for ServerCommand
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