server: finish port to axum w/ websockets
This commit is contained in:
@@ -10,10 +10,11 @@ pub struct ConnectionTracker {
|
||||
}
|
||||
|
||||
impl ConnectionTracker {
|
||||
pub fn add_peer(&mut self, socket: WebSocket, who: SocketAddr) {
|
||||
pub async fn add_peer(&mut self, socket: WebSocket, who: SocketAddr) {
|
||||
warn!("adding {who:?} to connection tracker");
|
||||
self.peers.insert(who, socket);
|
||||
self.send_message_all(WebsocketMessage::RefreshMessages);
|
||||
self.send_message_all(WebsocketMessage::RefreshMessages)
|
||||
.await;
|
||||
}
|
||||
pub async fn send_message_all(&mut self, msg: WebsocketMessage) {
|
||||
info!("send_message_all {msg}");
|
||||
|
||||
Reference in New Issue
Block a user