Package io.github.mahmoudimus.http3
Class Http3FrameType
java.lang.Object
io.github.mahmoudimus.http3.Http3FrameType
HTTP/3 frame type codes (RFC 9114 §7.2, §11.2.1).
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longCANCEL_PUSH (§7.2.3).static final longDATA (§7.2.1).static final longGOAWAY (§7.2.6).static final longHTTP/2's CONTINUATION, forbidden in HTTP/3.static final longHTTP/2's PING, forbidden in HTTP/3.static final longHTTP/2 frame types with no HTTP/3 equivalent: PRIORITY (0x02), PING (0x06), WINDOW_UPDATE (0x08) and CONTINUATION (0x09).static final longHTTP/2's WINDOW_UPDATE, forbidden in HTTP/3.static final longHEADERS (§7.2.2).static final longMAX_PUSH_ID (§7.2.7).static final longPUSH_PROMISE (§7.2.5).static final longSETTINGS (§7.2.4). -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisHttp2Only(long type) Whether the type is an HTTP/2 frame type that is forbidden in HTTP/3.static booleanisKnown(long type) Whether the type is one this codec parses into its ownHttp3Framerecord.static booleanisReserved(long value) Whethervaluehas the form 0x1f * N + 0x21 that HTTP/3 reserves for greasing frame types, stream types, setting identifiers and error codes (RFC 9114 §7.2.8, §6.2.3, §7.2.4.1, §8.1).static Stringname(long type) A readable name for a frame type, for messages.static longreserved(long n) Thenth reserved value, 0x1f * n + 0x21.
-
Field Details
-
DATA
public static final long DATADATA (§7.2.1).- See Also:
-
HEADERS
public static final long HEADERSHEADERS (§7.2.2).- See Also:
-
CANCEL_PUSH
public static final long CANCEL_PUSHCANCEL_PUSH (§7.2.3).- See Also:
-
SETTINGS
public static final long SETTINGSSETTINGS (§7.2.4).- See Also:
-
PUSH_PROMISE
public static final long PUSH_PROMISEPUSH_PROMISE (§7.2.5).- See Also:
-
GOAWAY
public static final long GOAWAYGOAWAY (§7.2.6).- See Also:
-
MAX_PUSH_ID
public static final long MAX_PUSH_IDMAX_PUSH_ID (§7.2.7).- See Also:
-
H2_PRIORITY
public static final long H2_PRIORITYHTTP/2 frame types with no HTTP/3 equivalent: PRIORITY (0x02), PING (0x06), WINDOW_UPDATE (0x08) and CONTINUATION (0x09). Receiving one is a connection error H3_FRAME_UNEXPECTED (RFC 9114 §7.2.8).- See Also:
-
H2_PING
public static final long H2_PINGHTTP/2's PING, forbidden in HTTP/3.- See Also:
-
H2_WINDOW_UPDATE
public static final long H2_WINDOW_UPDATEHTTP/2's WINDOW_UPDATE, forbidden in HTTP/3.- See Also:
-
H2_CONTINUATION
public static final long H2_CONTINUATIONHTTP/2's CONTINUATION, forbidden in HTTP/3.- See Also:
-
-
Method Details
-
isKnown
public static boolean isKnown(long type) Whether the type is one this codec parses into its ownHttp3Framerecord.- Parameters:
type- the frame type- Returns:
- whether it has a record of its own
-
isHttp2Only
public static boolean isHttp2Only(long type) Whether the type is an HTTP/2 frame type that is forbidden in HTTP/3.- Parameters:
type- the frame type- Returns:
- whether HTTP/3 forbids it
-
isReserved
public static boolean isReserved(long value) Whethervaluehas the form 0x1f * N + 0x21 that HTTP/3 reserves for greasing frame types, stream types, setting identifiers and error codes (RFC 9114 §7.2.8, §6.2.3, §7.2.4.1, §8.1). Such values have no meaning and must be ignored.- Parameters:
value- the frame type, stream type, setting identifier or error code- Returns:
- whether it is reserved
-
reserved
public static long reserved(long n) Thenth reserved value, 0x1f * n + 0x21.- Parameters:
n- which reserved value, from 0- Returns:
- the value
-
name
A readable name for a frame type, for messages.- Parameters:
type- the frame type- Returns:
- its name
-