This commit is contained in:
2026-08-11 19:09:37 -04:00
parent cf45fdd2b3
commit 4fd4f96521
5 changed files with 65 additions and 4 deletions
+11
View File
@@ -0,0 +1,11 @@
use axum::extract::ws::WebSocket;
impl super::Client {
pub async fn initialize(mut socket: WebSocket) -> anyhow::Result<Self> {
Ok(Self {
socket,
meta: super::ClientMeta {},
pub_key: String::new(),
})
}
}
+22
View File
@@ -0,0 +1,22 @@
use axum::extract::ws::WebSocket;
pub mod initialize;
pub struct Client {
pub socket: WebSocket,
pub meta: ClientMeta,
pub pub_key: String,
}
pub struct ClientMeta {}
pub enum ClientMessage {}
pub enum ServerMessage {}
impl Client {
pub async fn read_socket(mut socket: WebSocket) -> anyhow::Result<ClientMessage> {
unimplemented!()
// Ok(socket.recv().await?)
}
}