returns current RTO

This commit is contained in:
xtaci
2020-06-30 20:46:15 +08:00
parent 102f18da8b
commit b7b732f98f
+7
View File
@@ -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{}{}: