1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

impl SRS /api/v1/clients api.

This commit is contained in:
Jacob Su 2024-10-26 23:51:01 +08:00
parent 0b7fbe746e
commit a91d98e1ad
6 changed files with 233 additions and 11 deletions

View file

@ -43,3 +43,13 @@ func (m *Map[K, V]) Range(f func(key K, value V) bool) {
func (m *Map[K, V]) Store(key K, value V) {
m.m.Store(key, value)
}
func (m *Map[K, V]) Size() uint32 {
size := uint32(0)
m.m.Range(func(_, _ any) bool {
size++
return true
})
return size
}