forked from quic-go/quic-go
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
http3, integrationtests/self, interop/http09, .: WebTransport, HTTP/3…
… trailers This is a squashed commit of quic-go#3256. Subsequent commits will remove: - WebTransport - Trailers - Preemptive MASQUE/DATAGRAM features To slim down this PR.
- Loading branch information
Showing
46 changed files
with
3,579 additions
and
1,513 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package http3 | ||
|
||
import "fmt" | ||
|
||
const ( | ||
CapsuleTypeRegisterDatagramContext CapsuleType = 0x00 | ||
CapsuleTypeCloseDatagramContext CapsuleType = 0x01 | ||
CapsuleTypeDatagram CapsuleType = 0x02 | ||
CapsuleTypeRegisterDatagramNoContext CapsuleType = 0x03 | ||
) | ||
|
||
// A CapsuleType represents an HTTP capsule type. | ||
// https://www.ietf.org/archive/id/draft-ietf-masque-h3-datagram-03.html#name-capsule-types | ||
type CapsuleType uint64 | ||
|
||
// String returns the IETF registered name for t if available. | ||
func (t CapsuleType) String() string { | ||
switch t { | ||
case CapsuleTypeRegisterDatagramContext: | ||
return "REGISTER_DATAGRAM_CONTEXT" | ||
case CapsuleTypeCloseDatagramContext: | ||
return "CLOSE_DATAGRAM_CONTEXT" | ||
case CapsuleTypeDatagram: | ||
return "DATAGRAM" | ||
case CapsuleTypeRegisterDatagramNoContext: | ||
return "REGISTER_DATAGRAM_NO_CONTEXT" | ||
default: | ||
return fmt.Sprintf("%#x", uint64(t)) | ||
} | ||
} |
Oops, something went wrong.