mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
add WebSocketHandler to WebSocket struct
This commit is contained in:
parent
bc38e036da
commit
9310bb5572
@ -10,7 +10,7 @@ import (
|
|||||||
|
|
||||||
type WebSocket struct {
|
type WebSocket struct {
|
||||||
id string
|
id string
|
||||||
ws WebSocketHandler
|
ws *WebSocketHandler
|
||||||
connection *websocket.Conn
|
connection *websocket.Conn
|
||||||
mu sync.Mutex
|
mu sync.Mutex
|
||||||
}
|
}
|
||||||
|
@ -142,6 +142,7 @@ func (ws *WebSocketHandler) Upgrade(w http.ResponseWriter, r *http.Request) erro
|
|||||||
|
|
||||||
socket := &WebSocket{
|
socket := &WebSocket{
|
||||||
id: id,
|
id: id,
|
||||||
|
ws: ws,
|
||||||
connection: connection,
|
connection: connection,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user