Skip to content

Commit

Permalink
add session api
Browse files Browse the repository at this point in the history
  • Loading branch information
szpnygo committed Oct 13, 2022
1 parent c0b3342 commit d011142
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions session/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ func (sess *Session) SetOnCloseCallbacks(callbacks []func(id int64)) {
sess.OnCloseCallbacks = callbacks
}

func (sess *Session) SetOnCloseCallback(c func(id int64)) {
sess.OnCloseCallbacks = []func(id int64){c}
}

func (sess *Session) GetLatency() int64 {
return sess.agent.GetLatency()
}
Expand Down

0 comments on commit d011142

Please sign in to comment.