mirror of
https://github.com/m1k1o/neko.git
synced 2025-06-02 10:52:41 +02:00
session state decoupled.
This commit is contained in:
parent
4a28307c1e
commit
ecad2124fd
4 changed files with 8 additions and 19 deletions
|
@ -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
|
||||
// ---
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue