WebRTC refactor -> session dependency removal.

This commit is contained in:
Miroslav Šedivý 2020-10-31 21:20:42 +01:00
parent dadac4f145
commit b1b5a70c64
6 changed files with 25 additions and 28 deletions

View file

@ -6,6 +6,8 @@ import (
"strconv"
"github.com/pion/webrtc/v2"
"demodesk/neko/internal/types"
)
const OP_MOVE = 0x01
@ -36,8 +38,8 @@ type PayloadKey struct {
Key uint64
}
func (manager *WebRTCManager) handle(id string, msg webrtc.DataChannelMessage) error {
if !manager.sessions.IsHost(id) {
func (manager *WebRTCManager) handle(session types.Session, msg webrtc.DataChannelMessage) error {
if !session.IsHost() {
return nil
}