flesh 0.0.12

Flora's LowRes Extensible Super Highway
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use {async_trait::async_trait, std::io};

pub mod encoding;
pub mod network;
pub mod status;

#[async_trait]
pub trait PacketTransport: Send + Sync {
    /// Sends a single data packet.
    async fn send(&self, data: &[u8]) -> io::Result<()>;

    /// Receives a single data packet.
    async fn recv(&self) -> io::Result<Vec<u8>>;
}