1
Fork 0
mirror of https://github.com/jech/galene.git synced 2024-11-25 18:15:57 +01:00

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)