bevy_websocket_adapter 0.1.5

Simple adapter to receive WebSocket messages in your bevy games as native Rust types.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use thiserror::Error as TError;
use super::ConnectionHandle;

#[derive(TError, Debug)]
pub enum NetworkError {}

#[derive(Debug)]
pub enum NetworkEvent {
    Connected(ConnectionHandle),
    Disconnected(ConnectionHandle),
    Message(ConnectionHandle, Vec<u8>),
    Error(Option<ConnectionHandle>, anyhow::Error),
}