Compare commits
2 Commits
0c6e90e644
...
0c9b20d47f
Author | SHA1 | Date | |
---|---|---|---|
0c9b20d47f | |||
1e33734ab1 |
@ -17,6 +17,7 @@ type Server interface {
|
|||||||
GinHandlerFunc(auth func(c *gin.Context) (string, error)) gin.HandlerFunc
|
GinHandlerFunc(auth func(c *gin.Context) (string, error)) gin.HandlerFunc
|
||||||
Push(user any, name, msg string) bool
|
Push(user any, name, msg string) bool
|
||||||
Broadcast(name, msg string)
|
Broadcast(name, msg string)
|
||||||
|
ClientCount() int32
|
||||||
}
|
}
|
||||||
|
|
||||||
type clientChan struct {
|
type clientChan struct {
|
||||||
@ -157,3 +158,7 @@ func (stream *event) Broadcast(name, msg string) {
|
|||||||
return true
|
return true
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (stream *event) ClientCount() int32 {
|
||||||
|
return stream.Count.Load()
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user