Skip to content

Commit

Permalink
add more doc
Browse files Browse the repository at this point in the history
  • Loading branch information
joliveirinha committed Jun 27, 2022
1 parent 56645dc commit b218ee4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions interface.go
Expand Up @@ -216,10 +216,15 @@ type EarlyConnection interface {
type ConnectionIDGenerator interface {

// GenerateConnectionID generates a new ConnectionID.
// Generated ConnectionIDs should be unique and observers should not be able to correlate two ConnectionIDs.
GenerateConnectionID() ([]byte, error)

// ConnectionIDLen tells what is the length of the ConnectionIDs generated by the implementation of
// this interface.
// Valid lengths are between 0 and 20 and calls to GenerateConnectionID should always generate ConnectionIDs of
// that length, even if zero sized.
// 0-length ConnectionsIDs can be used when an endpoint (server or client) does not require multiplexing connections
// in the presence of a connection migration environment.
ConnectionIDLen() int
}

Expand Down

0 comments on commit b218ee4

Please sign in to comment.