websocket peer add event.

This commit is contained in:
Miroslav Šedivý
2021-09-01 21:11:07 +02:00
parent 4341257f14
commit 5b5e541cc0
3 changed files with 22 additions and 17 deletions

View File

@ -15,7 +15,7 @@ type WebSocketHandler func(Session, WebSocketMessage) bool
type CheckOrigin func(r *http.Request) bool
type WebSocketPeer interface {
Send(v interface{}) error
Send(event string, payload interface{})
Destroy()
}