Skip to content

Commit

Permalink
CCID opens in OPEN. CLOSING timer shorter.
Browse files Browse the repository at this point in the history
  • Loading branch information
petar committed Nov 20, 2011
1 parent 5b5e60b commit 12c05fb
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
6 changes: 6 additions & 0 deletions dccp/NOTES
@@ -0,0 +1,6 @@

* We don't start CCID in PARTOPEN (rather wait until OPEN), because
in PARTOPEN the client still needs to send (Ack,Sync) packet pairs,
but the initial CCID rate is 1 packet per second, which slows down
the handshake to OPEN, since the second packet of the (Ack,Sync)
sequence has to wait for a whole second.
7 changes: 1 addition & 6 deletions dccp/TESTING
@@ -1,10 +1,5 @@

* after 1sec, CCID has not been open on server

* why does packet exchange stop in 6 seconds
* because OnIdle is not called regularly, which is the case because SetReadTimeout is not
implemented by the HeaderConn.
* Add a runtime check in readLoop that SetReadTimeout works roughly correctly?
* implement SetReadTimeout

* ensure behavior stabilizes if both sides remain silent after connect and connection does not close
perpetually
Expand Down
3 changes: 2 additions & 1 deletion dccp/goto.go
Expand Up @@ -117,7 +117,7 @@ func (c *Conn) gotoPARTOPEN() {
c.AssertLocked()
c.socket.SetState(PARTOPEN)
c.emitSetState()
c.openCCID()
// c.openCCID()
c.inject(nil) // Unblocks the writeLoop select, so it can see the state change

// Start PARTOPEN timer, according to Section 8.1.5
Expand Down Expand Up @@ -181,6 +181,7 @@ func (c *Conn) gotoCLOSING() {
c.Lock()
rtt := c.socket.GetRTT()
c.Unlock()
c.Logger.Emit("conn", "Event", nil, "CLOSING RTT=%dns", rtt)
b := newBackOff(2*rtt, CLOSING_BACKOFF_MAX, CLOSING_BACKOFF_FREQ)
for {
err, _ := b.Sleep()
Expand Down
2 changes: 1 addition & 1 deletion dccp/socket.go
Expand Up @@ -76,7 +76,7 @@ const (
RTT_MIN = 2e6 // ...
MSL = 2 * 60e9 // 2 mins in nanoseconds, Maximum Segment Lifetime, Section 3.4
CLOSING_BACKOFF_FREQ = 64e9 // Backoff frequency of CLOSING timer, 64 seconds, Section 8.3
CLOSING_BACKOFF_MAX = MSL // Maximum amount of time in CLOSING timer
CLOSING_BACKOFF_MAX = MSL/4 // Maximum time in CLOSING (RFC recommends MSL, but seems too long)
MAX_OPTIONS_SIZE = 128
)

Expand Down

0 comments on commit 12c05fb

Please sign in to comment.