mirror of
https://github.com/m1k1o/neko.git
synced 2025-05-24 14:37:05 +02:00
session id to session.
This commit is contained in:
parent
fdf5839547
commit
e5eaf5c60c
3 changed files with 12 additions and 18 deletions
|
@ -6,10 +6,12 @@ import (
|
|||
"sync"
|
||||
|
||||
"github.com/gorilla/websocket"
|
||||
|
||||
"demodesk/neko/internal/types"
|
||||
)
|
||||
|
||||
type WebSocketCtx struct {
|
||||
id string
|
||||
session types.Session
|
||||
address string
|
||||
ws *WebSocketManagerCtx
|
||||
connection *websocket.Conn
|
||||
|
@ -40,7 +42,7 @@ func (socket *WebSocketCtx) Send(v interface{}) error {
|
|||
}
|
||||
|
||||
socket.ws.logger.Debug().
|
||||
Str("session", socket.id).
|
||||
Str("session", socket.session.ID()).
|
||||
Str("address", socket.connection.RemoteAddr().String()).
|
||||
Str("raw", string(raw)).
|
||||
Msg("sending message to client")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue