async fn handle_socket(socket: WebSocket, state: Arc<WebSocketState>)Expand description
Handles a single WebSocket connection.
This asynchronous function manages sending messages from a broadcast channel to the client and handles incoming messages from the client (e.g., pings, close).
ยงArguments
socket- The establishedWebSocketconnection.state- The sharedWebSocketState.