1
Fork 0

Move client actions to webclient.go.

These are specific to webclients.
This commit is contained in:
Juliusz Chroboczek 2020-09-13 11:57:33 +02:00
parent 78e9c96a53
commit fb02c6fe1f
2 changed files with 25 additions and 25 deletions

View File

@ -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

View File

@ -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)