new MemberProfile & session refactor.

This commit is contained in:
Miroslav Šedivý
2020-12-02 17:29:38 +01:00
parent 220e162f42
commit 0d2f3405bb
4 changed files with 122 additions and 62 deletions

View File

@ -238,6 +238,18 @@ func (manager *SessionManagerCtx) OnDisconnected(listener func(session types.Ses
})
}
func (manager *SessionManagerCtx) OnReceivingStarted(listener func(session types.Session)) {
manager.emmiter.On("receiving_started", func(payload ...interface{}) {
listener(payload[0].(*SessionCtx))
})
}
func (manager *SessionManagerCtx) OnReceivingStopped(listener func(session types.Session)) {
manager.emmiter.On("receiving_stopped", func(payload ...interface{}) {
listener(payload[0].(*SessionCtx))
})
}
// ---
// config
// ---