From 06282d806465d9af99ed75ffe1e1c045be067c35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0ediv=C3=BD?= Date: Sat, 31 Oct 2020 19:59:17 +0100 Subject: [PATCH] remove unused websocket functions. --- internal/session/manager.go | 4 ---- internal/session/session.go | 7 ------- internal/types/session.go | 2 -- 3 files changed, 13 deletions(-) diff --git a/internal/session/manager.go b/internal/session/manager.go index 33829f7a..6871e6e9 100644 --- a/internal/session/manager.go +++ b/internal/session/manager.go @@ -135,10 +135,6 @@ func (manager *SessionManager) Destroy(id string) error { return nil } -func (manager *SessionManager) Clear() error { - return nil -} - func (manager *SessionManager) Broadcast(v interface{}, exclude interface{}) error { for id, session := range manager.members { if !session.connected { diff --git a/internal/session/session.go b/internal/session/session.go index 869d7fda..c760f53b 100644 --- a/internal/session/session.go +++ b/internal/session/session.go @@ -104,13 +104,6 @@ func (session *Session) Send(v interface{}) error { return session.socket.Send(v) } -func (session *Session) Write(v interface{}) error { - if session.socket == nil { - return nil - } - return session.socket.Send(v) -} - func (session *Session) SignalAnswer(sdp string) error { if session.peer == nil { return nil diff --git a/internal/types/session.go b/internal/types/session.go index acdcac64..95f4f876 100644 --- a/internal/types/session.go +++ b/internal/types/session.go @@ -21,7 +21,6 @@ type Session interface { SetPeer(peer Peer) error Address() string Kick(message string) error - Write(v interface{}) error Send(v interface{}) error SignalAnswer(sdp string) error } @@ -38,7 +37,6 @@ type SessionManager interface { Members() []*Member Admins() []*Member Destroy(id string) error - Clear() error Broadcast(v interface{}, exclude interface{}) error OnHost(listener func(id string)) OnHostCleared(listener func(id string))