easy_esp 0.5.0

Wrapper around socket functionality to make using devices safer and easier
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use std::net::SocketAddr;

/// Defines commands that can be sent to the server.
#[derive(Clone, Debug)]
pub enum ServerCMD {
    /// Instructs the server to shut down with the specified error code.
    ShutDown(u32), // Error code

    /// Instructs the server to send a message to all connected clients.
    SendAll(String), // Message

    /// Instructs the server to kick a certain client identified by its socket address.
    Kick(SocketAddr), // Kick a certain client
}