merge develop into master #21
@ -203,7 +203,7 @@ func (c *NewReno) AwaitEarlyUpdate(keepalive time.Duration) uint32 {
|
|||||||
c.updateAckNack()
|
c.updateAckNack()
|
||||||
|
|
||||||
// CASE 1: > 5 waiting ACKs or any waiting NACKs and no message sent in the last RTT
|
// CASE 1: > 5 waiting ACKs or any waiting NACKs and no message sent in the last RTT
|
||||||
if ((c.lastAck!=c.ack) || (c.lastNack != c.nack)) && time.Now().After(c.lastSent.Add(rtt)) {
|
if ((c.lastAck != c.ack) || (c.lastNack != c.nack)) && time.Now().After(c.lastSent.Add(rtt)) {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
package congestion
|
package congestion
|
||||||
|
|
||||||
import "time"
|
import (
|
||||||
|
"fmt"
|
||||||
|
"time"
|
||||||
|
)
|
||||||
|
|
||||||
type None struct {
|
type None struct {
|
||||||
sequence chan uint32
|
sequence chan uint32
|
||||||
@ -27,17 +30,16 @@ func NewNone() *None {
|
|||||||
return &c
|
return &c
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *None) Sequence() uint32 {
|
func (c *None) String() string {
|
||||||
return <-c.sequence
|
return fmt.Sprintf("{None}")
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *None) ReceivedPacket(uint32) {}
|
func (c *None) ReceivedPacket(uint32) {}
|
||||||
func (c *None) ReceivedAck(uint32) {}
|
func (c *None) ReceivedAck(uint32) {}
|
||||||
func (c *None) NextAck() uint32 { return 0 }
|
func (c *None) ReceivedNack(uint32) {}
|
||||||
func (c *None) ReceivedNack(uint32) {}
|
func (c *None) Reset() {}
|
||||||
func (c *None) NextNack() uint32 { return 0 }
|
func (c *None) AwaitAck(time.Duration) bool { return true }
|
||||||
func (c *None) AwaitEarlyUpdate(time.Duration) uint32 {
|
func (c *None) NextNack() uint32 { return 0 }
|
||||||
select {}
|
func (c *None) NextAck() uint32 { return 0 }
|
||||||
}
|
func (c *None) AwaitEarlyUpdate(time.Duration) uint32 { select {} }
|
||||||
func (c *None) AwaitAck(time.Duration) bool { return true }
|
func (c *None) Sequence() uint32 { return <-c.sequence }
|
||||||
func (c *None) Reset() {}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user