mirror of
https://github.com/xtaci/kcp-go.git
synced 2024-04-21 12:32:15 +00:00
returns current RTO
This commit is contained in:
@@ -604,6 +604,13 @@ func (s *UDPSession) update() {
|
||||
// GetConv gets conversation id of a session
|
||||
func (s *UDPSession) GetConv() uint32 { return s.kcp.conv }
|
||||
|
||||
// GetRTO gets current rto of the session
|
||||
func (s *UDPSession) GetRTO() uint32 {
|
||||
s.mu.Lock()
|
||||
defer s.mu.Unlock()
|
||||
return s.kcp.rx_rto
|
||||
}
|
||||
|
||||
func (s *UDPSession) notifyReadEvent() {
|
||||
select {
|
||||
case s.chReadEvent <- struct{}{}:
|
||||
|
||||
Reference in New Issue
Block a user