From fb02c6fe1f5642ff4924ffc5968cf72ce48a43b7 Mon Sep 17 00:00:00 2001 From: Juliusz Chroboczek Date: Sun, 13 Sep 2020 11:57:33 +0200 Subject: [PATCH] Move client actions to webclient.go. These are specific to webclients. --- group.go | 25 ------------------------- webclient.go | 25 +++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/group.go b/group.go index 1f09106..5310947 100644 --- a/group.go +++ b/group.go @@ -41,31 +41,6 @@ type group struct { history []chatHistoryEntry } -type pushConnAction struct { - id string - conn upConnection - tracks []upTrack -} - -type addLabelAction struct { - id string - label string -} - -type pushConnsAction struct { - c client -} - -type connectionFailedAction struct { - id string -} - -type permissionsChangedAction struct{} - -type kickAction struct { - message string -} - var groups struct { mu sync.Mutex groups map[string]*group diff --git a/webclient.go b/webclient.go index 5d8dbd6..b83c77f 100644 --- a/webclient.go +++ b/webclient.go @@ -725,6 +725,31 @@ func startClient(conn *websocket.Conn) (err error) { return clientLoop(c, conn) } +type pushConnAction struct { + id string + conn upConnection + tracks []upTrack +} + +type addLabelAction struct { + id string + label string +} + +type pushConnsAction struct { + c client +} + +type connectionFailedAction struct { + id string +} + +type permissionsChangedAction struct{} + +type kickAction struct { + message string +} + func clientLoop(c *webClient, conn *websocket.Conn) error { read := make(chan interface{}, 1) go clientReader(conn, read, c.done)