Commit fb02c6fe authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Move client actions to webclient.go.

These are specific to webclients.
parent 78e9c96a
...@@ -41,31 +41,6 @@ type group struct { ...@@ -41,31 +41,6 @@ type group struct {
history []chatHistoryEntry 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 { var groups struct {
mu sync.Mutex mu sync.Mutex
groups map[string]*group groups map[string]*group
......
...@@ -725,6 +725,31 @@ func startClient(conn *websocket.Conn) (err error) { ...@@ -725,6 +725,31 @@ func startClient(conn *websocket.Conn) (err error) {
return clientLoop(c, conn) 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 { func clientLoop(c *webClient, conn *websocket.Conn) error {
read := make(chan interface{}, 1) read := make(chan interface{}, 1)
go clientReader(conn, read, c.done) go clientReader(conn, read, c.done)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment