diff --git a/interface.go b/interface.go index 0b75fe2b111..f60d8a5231a 100644 --- a/interface.go +++ b/interface.go @@ -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 }