mirror of
https://github.com/m1k1o/neko.git
synced 2025-07-30 15:00:26 +02:00
session websocket add event.
This commit is contained in:
parent
5b5e541cc0
commit
3ac1b481ad
3 changed files with 10 additions and 14 deletions
|
@ -79,12 +79,12 @@ func (session *SessionCtx) GetWebSocketPeer() types.WebSocketPeer {
|
|||
return session.websocketPeer
|
||||
}
|
||||
|
||||
func (session *SessionCtx) Send(v interface{}) error {
|
||||
func (session *SessionCtx) Send(event string, payload interface{}) {
|
||||
if session.websocketPeer == nil {
|
||||
return nil
|
||||
return
|
||||
}
|
||||
|
||||
return session.websocketPeer.Send(v)
|
||||
session.websocketPeer.Send(event, payload)
|
||||
}
|
||||
|
||||
// ---
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue