mirror of
https://github.com/m1k1o/neko.git
synced 2025-06-03 03:12:41 +02:00
socket -> websocket_peer.
This commit is contained in:
parent
d49542013b
commit
ff7efe9f3b
7 changed files with 68 additions and 68 deletions
|
@ -142,13 +142,13 @@ func (ws *WebSocketManagerCtx) Upgrade(w http.ResponseWriter, r *http.Request) e
|
|||
return connection.Close()
|
||||
}
|
||||
|
||||
socket := &WebSocketCtx{
|
||||
websocket_peer := &WebSocketPeerCtx{
|
||||
session: session,
|
||||
ws: ws,
|
||||
connection: connection,
|
||||
}
|
||||
|
||||
ok, reason := ws.handler.Connected(session, socket)
|
||||
ok, reason := ws.handler.Connected(session, websocket_peer)
|
||||
if !ok {
|
||||
// TODO: Refactor
|
||||
if err = connection.WriteJSON(message.Disconnect{
|
||||
|
@ -161,7 +161,7 @@ func (ws *WebSocketManagerCtx) Upgrade(w http.ResponseWriter, r *http.Request) e
|
|||
return connection.Close()
|
||||
}
|
||||
|
||||
session.SetSocket(socket)
|
||||
session.SetWebSocketPeer(websocket_peer)
|
||||
|
||||
ws.logger.
|
||||
Debug().
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue