session state decoupled.

This commit is contained in:
Miroslav Šedivý 2021-03-14 00:50:08 +01:00
parent 4a28307c1e
commit ecad2124fd
4 changed files with 8 additions and 19 deletions

View file

@ -45,22 +45,14 @@ func (session *SessionCtx) profileChanged() {
}
}
// ---
// state
// ---
func (session *SessionCtx) State() types.SessionState {
return session.state
}
func (session *SessionCtx) IsHost() bool {
return session.manager.host != nil && session.manager.host == session
}
func (session *SessionCtx) IsConnected() bool {
return session.state.IsConnected
}
func (session *SessionCtx) State() types.SessionState {
return session.state
}
// ---
// webscoket
// ---