Refactor websocket session sync (#44)

* refactor websocket peer and comment functions.

* update comments.

* add DestroyWebSocketPeer.
This commit is contained in:
Miroslav Šedivý
2023-04-23 11:23:20 +02:00
committed by GitHub
parent 43f8fe339f
commit 0ea1c2870f
5 changed files with 84 additions and 61 deletions

View File

@ -46,9 +46,9 @@ type Session interface {
SetCursor(cursor Cursor)
// websocket
SetWebSocketPeer(websocketPeer WebSocketPeer)
SetWebSocketConnected(websocketPeer WebSocketPeer, connected bool, delayed bool)
GetWebSocketPeer() WebSocketPeer
ConnectWebSocketPeer(websocketPeer WebSocketPeer)
DisconnectWebSocketPeer(websocketPeer WebSocketPeer, delayed bool)
DestroyWebSocketPeer(reason string)
Send(event string, payload any)
// webrtc