update logging and add testing to make sure client IDs are stable

This commit is contained in:
2026-04-08 12:27:16 -05:00
parent bdbb2957c1
commit 3cff324d9d
2 changed files with 9 additions and 3 deletions
+3 -3
View File
@@ -41,19 +41,19 @@ func (e *Engine) Handle(w http.ResponseWriter, r *http.Request) {
}
func (e *Engine) OnConnect(clientID string) error {
slog.Debug("Connected to websocket")
slog.Debug("Connected to websocket", "client", clientID)
// TODO: implement the logic to handle the connection
return nil
}
func (e *Engine) OnDisconnect(clientID string) error {
slog.Debug("Disconnected from websocket")
slog.Debug("Disconnected from websocket", "client", clientID)
// TODO: implement the logic to handle the disconnection
return nil
}
func (e *Engine) OnReceiveMessage(clientID string, msg map[string]interface{}) error {
slog.Debug("Received message", "message", msg)
slog.Debug("Received message", "from", clientID, "message", msg)
// TODO: implement the logic to handle the message
return nil
}