feat: tipos WSHub, WSClient, WSMessage, SSEEvent (issue 0011 fase 1)

This commit is contained in:
2026-04-18 17:10:28 +02:00
parent 95826cb14f
commit 0255207514
10 changed files with 263 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
package infra
import (
"nhooyr.io/websocket"
)
// WSClient representa una conexion WebSocket individual.
// Cada cliente tiene su propio canal de envio buffereado y una
// referencia al hub al que pertenece.
type WSClient struct {
Hub *WSHub
Conn *websocket.Conn
Send chan []byte
ID string
}