mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-05 21:27:35 +03:00
fix some typos in documentation and tests
This commit is contained in:
parent
f34eddae41
commit
a98e60c28c
5 changed files with 8 additions and 8 deletions
|
@ -124,7 +124,7 @@ type SendStream interface {
|
||||||
// Write will unblock immediately, and future calls to Write will fail.
|
// Write will unblock immediately, and future calls to Write will fail.
|
||||||
// When called multiple times or after closing the stream it is a no-op.
|
// When called multiple times or after closing the stream it is a no-op.
|
||||||
CancelWrite(StreamErrorCode)
|
CancelWrite(StreamErrorCode)
|
||||||
// The context is canceled as soon as the write-side of the stream is closed.
|
// The Context is canceled as soon as the write-side of the stream is closed.
|
||||||
// This happens when Close() or CancelWrite() is called, or when the peer
|
// This happens when Close() or CancelWrite() is called, or when the peer
|
||||||
// cancels the read-side of their stream.
|
// cancels the read-side of their stream.
|
||||||
// Warning: This API should not be considered stable and might change soon.
|
// Warning: This API should not be considered stable and might change soon.
|
||||||
|
@ -132,7 +132,7 @@ type SendStream interface {
|
||||||
// SetWriteDeadline sets the deadline for future Write calls
|
// SetWriteDeadline sets the deadline for future Write calls
|
||||||
// and any currently-blocked Write call.
|
// and any currently-blocked Write call.
|
||||||
// Even if write times out, it may return n > 0, indicating that
|
// Even if write times out, it may return n > 0, indicating that
|
||||||
// some of the data was successfully written.
|
// some data was successfully written.
|
||||||
// A zero value for t means Write will not time out.
|
// A zero value for t means Write will not time out.
|
||||||
SetWriteDeadline(t time.Time) error
|
SetWriteDeadline(t time.Time) error
|
||||||
}
|
}
|
||||||
|
@ -206,7 +206,7 @@ type Session interface {
|
||||||
type EarlySession interface {
|
type EarlySession interface {
|
||||||
Session
|
Session
|
||||||
|
|
||||||
// Blocks until the handshake completes (or fails).
|
// HandshakeComplete blocks until the handshake completes (or fails).
|
||||||
// Data sent before completion of the handshake is encrypted with 1-RTT keys.
|
// Data sent before completion of the handshake is encrypted with 1-RTT keys.
|
||||||
// Note that the client's identity hasn't been verified yet.
|
// Note that the client's identity hasn't been verified yet.
|
||||||
HandshakeComplete() context.Context
|
HandshakeComplete() context.Context
|
||||||
|
|
|
@ -19,7 +19,7 @@ type connectionFlowController struct {
|
||||||
var _ ConnectionFlowController = &connectionFlowController{}
|
var _ ConnectionFlowController = &connectionFlowController{}
|
||||||
|
|
||||||
// NewConnectionFlowController gets a new flow controller for the connection
|
// NewConnectionFlowController gets a new flow controller for the connection
|
||||||
// It is created before we receive the peer's transport paramenters, thus it starts with a sendWindow of 0.
|
// It is created before we receive the peer's transport parameters, thus it starts with a sendWindow of 0.
|
||||||
func NewConnectionFlowController(
|
func NewConnectionFlowController(
|
||||||
receiveWindow protocol.ByteCount,
|
receiveWindow protocol.ByteCount,
|
||||||
maxReceiveWindow protocol.ByteCount,
|
maxReceiveWindow protocol.ByteCount,
|
||||||
|
|
|
@ -77,7 +77,7 @@ var _ = Describe("Connection Flow controller", func() {
|
||||||
Expect(offset).To(Equal(oldOffset + dataRead + 60))
|
Expect(offset).To(Equal(oldOffset + dataRead + 60))
|
||||||
})
|
})
|
||||||
|
|
||||||
It("autotunes the window", func() {
|
It("auto-tunes the window", func() {
|
||||||
oldOffset := controller.bytesRead
|
oldOffset := controller.bytesRead
|
||||||
oldWindowSize := controller.receiveWindowSize
|
oldWindowSize := controller.receiveWindowSize
|
||||||
rtt := scaleDuration(20 * time.Millisecond)
|
rtt := scaleDuration(20 * time.Millisecond)
|
||||||
|
@ -118,7 +118,7 @@ var _ = Describe("Connection Flow controller", func() {
|
||||||
Expect(controller.receiveWindowSize).To(Equal(oldWindowSize))
|
Expect(controller.receiveWindowSize).To(Equal(oldWindowSize))
|
||||||
})
|
})
|
||||||
|
|
||||||
It("doens't increase the window size beyond the maxReceiveWindowSize", func() {
|
It("doesn't increase the window size beyond the maxReceiveWindowSize", func() {
|
||||||
max := controller.maxReceiveWindowSize
|
max := controller.maxReceiveWindowSize
|
||||||
controller.EnsureMinimumWindowSize(2 * max)
|
controller.EnsureMinimumWindowSize(2 * max)
|
||||||
Expect(controller.receiveWindowSize).To(Equal(max))
|
Expect(controller.receiveWindowSize).To(Equal(max))
|
||||||
|
|
|
@ -8,7 +8,7 @@ import (
|
||||||
. "github.com/onsi/gomega"
|
. "github.com/onsi/gomega"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestCrypto(t *testing.T) {
|
func TestFlowControl(t *testing.T) {
|
||||||
RegisterFailHandler(Fail)
|
RegisterFailHandler(Fail)
|
||||||
RunSpecs(t, "FlowControl Suite")
|
RunSpecs(t, "FlowControl Suite")
|
||||||
}
|
}
|
||||||
|
|
|
@ -189,7 +189,7 @@ var _ = Describe("Stream Flow controller", func() {
|
||||||
Expect(queuedWindowUpdate).To(BeFalse())
|
Expect(queuedWindowUpdate).To(BeFalse())
|
||||||
})
|
})
|
||||||
|
|
||||||
It("tells the connection flow controller when the window was autotuned", func() {
|
It("tells the connection flow controller when the window was auto-tuned", func() {
|
||||||
oldOffset := controller.bytesRead
|
oldOffset := controller.bytesRead
|
||||||
setRtt(scaleDuration(20 * time.Millisecond))
|
setRtt(scaleDuration(20 * time.Millisecond))
|
||||||
controller.epochStartOffset = oldOffset
|
controller.epochStartOffset = oldOffset
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue