post webrtc intégration

This commit is contained in:
2026-09-12 21:11:14 +02:00
parent 6b8cccc082
commit 9a07b368d6
27 changed files with 2180 additions and 584 deletions
+3 -2
View File
@@ -56,9 +56,10 @@ async fn handle_socket(socket: WebSocket, state: AppState, user: User) {
// Task pour recevoir les messages du WebSocket
let client_clone = client.clone();
let state_clone = state.clone();
let mut recv_task = tokio::spawn(async move {
while let Some(Ok(message)) = receiver.next().await {
client_clone.on_message(message).await;
client_clone.on_message(message, &state_clone).await;
}
});
@@ -70,5 +71,5 @@ async fn handle_socket(socket: WebSocket, state: AppState, user: User) {
state.gateway.remove_client(&client);
// // Déconnexion (Disconnect)
client.on_disconnect().await;
client.on_disconnect(&state).await;
}