bevy_rtc 0.3.1

A client-server library designed over WebRTC for Bevy
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use bevy::ecs::event::Event;
use bevy_matchbox::matchbox_socket::PeerId;

/// Socket events that are possible to subscribe to in Bevy
#[derive(Debug, Clone, Event)]
pub enum RtcServerEvent {
    /// The signaling server assigned the socket a unique ID
    IdAssigned(PeerId),
    /// A peer has joined this server
    ClientJoined(PeerId),
    /// A peer has left this server
    ClientLeft(PeerId),
}