Add initial server implementation

This adventure is going to be epic, be ready.
This commit is contained in:
2023-02-16 20:00:14 +01:00
parent 8943d1d898
commit 831a5003c3
6 changed files with 85 additions and 0 deletions

1
board-network/src/lib.rs Normal file
View File

@@ -0,0 +1 @@
pub mod protocol;

View File

@@ -0,0 +1,15 @@
use serde::{Deserialize, Serialize};
#[derive(Debug, Deserialize, Eq, PartialEq, Serialize)]
pub enum ClientMessage {
CreateRoom(String),
JoinRoom(String, String),
Disconnected,
}
#[derive(Clone, Debug, Deserialize, Eq, PartialEq, Serialize)]
pub enum ServerMessage {
JoinedRoom {
room_name: String,
},
}