Use envelope as value

This commit is contained in:
Ola
2024-03-06 18:05:19 +01:00
parent 4c79256c40
commit 3823d1271f
4 changed files with 21 additions and 21 deletions
+4 -4
View File
@@ -61,10 +61,10 @@ func (ss *sessionSet) all() []*Session {
type hub struct {
sessions sessionSet
broadcast chan *envelope
broadcast chan envelope
register chan *Session
unregister chan *Session
exit chan *envelope
exit chan envelope
open atomic.Bool
}
@@ -73,10 +73,10 @@ func newHub() *hub {
sessions: sessionSet{
members: make(map[*Session]struct{}),
},
broadcast: make(chan *envelope),
broadcast: make(chan envelope),
register: make(chan *Session),
unregister: make(chan *Session),
exit: make(chan *envelope),
exit: make(chan envelope),
}
}