forked from quic-go/quic-go
expose function to convert byte slice to a connection ID (#3614)
This commit is contained in:
committed by
GitHub
parent
9540d0fed2
commit
7b211d6574
@@ -206,6 +206,12 @@ type EarlyConnection interface {
|
|||||||
// as they are allowed by RFC 8999.
|
// as they are allowed by RFC 8999.
|
||||||
type ConnectionID = protocol.ConnectionID
|
type ConnectionID = protocol.ConnectionID
|
||||||
|
|
||||||
|
// ConnectionIDFromBytes interprets b as a Connection ID. It panics if b is
|
||||||
|
// longer than 20 bytes.
|
||||||
|
func ConnectionIDFromBytes(b []byte) ConnectionID {
|
||||||
|
return protocol.ParseConnectionID(b)
|
||||||
|
}
|
||||||
|
|
||||||
// A ConnectionIDGenerator is an interface that allows clients to implement their own format
|
// A ConnectionIDGenerator is an interface that allows clients to implement their own format
|
||||||
// for the Connection IDs that servers/clients use as SrcConnectionID in QUIC packets.
|
// for the Connection IDs that servers/clients use as SrcConnectionID in QUIC packets.
|
||||||
//
|
//
|
||||||
|
|||||||
Reference in New Issue
Block a user