src/h2.bend checks
raw source on the hub · import bend-kube-runtime@0.11.0.0/src/h2.bend as H2
3 imports
import Base import ./http.bend as H import ./hpack.bend as Hp
Types
type Frame source · line 57 · raw
Data
Frame@ty:U32 -> @flags:U32 -> @sid:U32 -> @payload:List<&2, U32> -> Frame
type FRd source · line 94 · raw
Data
Reading frames --------------
A byte at a time, so a frame may come split over many reads and many frames in one. FPre: preface bytes the server still expects FHead: header bytes so far, reversed FBody: left payload bytes of the frame to go, acc reversed FBad: a connection error; it stays here
FPre@left:List<&2, U32> -> FRd
FHead@n:U32 -> @acc:List<&2, U32> -> FRd
FBody@ty:U32 -> @flags:U32 -> @sid:U32 -> @left:U32 -> @acc:List<&2, U32> -> FRd
FBad@code:U32 -> @why:String -> FRd
type FStep source · line 100 · raw
Data
FStep@rd:FRd -> @got:Maybe<&2, Frame> -> FStep
type FFed source · line 168 · raw
Data
FFed@rd:FRd -> @frames:List<&2, Frame> -> FFed
type H2Cfg source · line 197 · raw
Data
What we advertise (our SETTINGS) and hold to: the largest frame we read (16384, the default, since we never raise it), each stream's initial receive window (at least 65535), the connection's receive window, how many streams the peer may open at once, and the header list's cap.
H2Cfg@server:Bool -> @max_frame:U32 -> @init:U32 -> @cwin:U32 -> @max_streams:U32 -> @list_cap:U32 -> H2Cfg
type H2Peer source · line 201 · raw
Data
What the peer's SETTINGS allow us.
H2Peer@max_frame:U32 -> @init:U32 -> @max_streams:U32 -> H2Peer
type Chunk source · line 205 · raw
Data
What a stream has still to send, in order.
CHead@hs:List<&2, 0x3b6cf044a15b0f294883035a8a89b794/src/http.Header> -> @end:Bool -> Chunk
CData@bs:List<&2, U32> -> @end:Bool -> Chunk
type Strm source · line 212 · raw
Data
A stream: its send window (biased by 2^31), the bytes received since we last gave its window back, whether each side has ended it (lend: we sent END_STREAM; rend: the peer did), and what waits to be sent.
Strm@id:U32 -> @sw:U32 -> @rused:U32 -> @lend:Bool -> @rend:Bool -> @q:List<&2, Chunk> -> Strm
type HCont source · line 216 · raw
Data
A header block still waiting for CONTINUATION frames.
HCont@sid:U32 -> @end:Bool -> @acc:List<&2, U32> -> HCont
type H2Ev source · line 225 · raw
Data
What the application hears. EvHeaders: a header block on sid (a request, a response or trailers) EvData: data on sid; end is END_STREAM EvRst: sid was reset, by the peer or by us EvGoaway: the peer will take no stream past last EvFatal: a connection error; the GOAWAY is queued, then close
EvHeaders@sid:U32 -> @hs:List<&2, 0x3b6cf044a15b0f294883035a8a89b794/src/http.Header> -> @end:Bool -> H2Ev
EvData@sid:U32 -> @bs:List<&2, U32> -> @end:Bool -> H2Ev
EvRst@sid:U32 -> @code:U32 -> H2Ev
EvGoaway@last:U32 -> @code:U32 -> H2Ev
EvFatal@code:U32 -> @why:String -> H2Ev
type H2 source · line 238 · raw
Data
A connection: our settings and the peer's, the HPACK tables, the connection's send window and the bytes received since we gave its window back, the streams, a header block in progress, the highest stream the peer opened, the next one we open, whether it is over (a GOAWAY sent or a connection error), and what waits for H2.take: bytes to write and events, both reversed.
H2@cfg:H2Cfg -> @peer:H2Peer -> @rd:FRd -> @dec:0x3b6cf044a15b0f294883035a8a89b794/src/hpack.HDec -> @enc:0x3b6cf044a15b0f294883035a8a89b794/src/hpack.HEnc -> @csw:U32 -> @crused:U32 -> @streams:List<&2, Strm> -> @cont:Maybe<&2, HCont> -> @last:U32 -> @next:U32 -> @dead:Bool -> @out:List<&2, List<&2, U32>> -> @evs:List<&2, H2Ev> -> H2
type DEv source · line 485 · raw
Data
A stream being drained, with the connection's send window, encoder, the peer's largest frame and the bytes to write.
DEv@id:U32 -> @sw:U32 -> @ru:U32 -> @le:Bool -> @re:Bool -> @csw:U32 -> @enc:0x3b6cf044a15b0f294883035a8a89b794/src/hpack.HEnc -> @mf:U32 -> @out:List<&2, List<&2, U32>> -> DEv
type DStep source · line 488 · raw
Data
DGo@ev:DEv -> DStep
DStop@ev:DEv -> @left:Chunk -> DStep
type DOut source · line 525 · raw
Data
DOut@s:Strm -> @csw:U32 -> @enc:0x3b6cf044a15b0f294883035a8a89b794/src/hpack.HEnc -> @out:List<&2, List<&2, U32>> -> DOut
type FEv source · line 542 · raw
Data
FEv@csw:U32 -> @enc:0x3b6cf044a15b0f294883035a8a89b794/src/hpack.HEnc -> @mf:U32 -> @out:List<&2, List<&2, U32>> -> @kept:List<&2, Strm> -> FEv
type H2Opened source · line 1167 · raw
Data
H2Opened@c:H2 -> @sid:U32 -> H2Opened
type H2Take source · line 1227 · raw
Data
H2Take@c:H2 -> @bytes:List<&2, U32> -> @evs:List<&2, H2Ev> -> H2Take
Definitions
def H2.no_error source · line 24 · raw
U32
Error codes (RFC 9113 section 7).
def H2.protocol_error source · line 27 · raw
U32
def H2.internal_error source · line 30 · raw
U32
def H2.flow_control_error source · line 33 · raw
U32
def H2.stream_closed source · line 36 · raw
U32
def H2.frame_size_error source · line 39 · raw
U32
def H2.refused_stream source · line 42 · raw
U32
def H2.cancel source · line 45 · raw
U32
def H2.compression_error source · line 48 · raw
U32
def H2.enhance_your_calm source · line 51 · raw
U32
def H2.be32 source · line 60 · raw
@+x:U32 -> @rest:List<&2, U32> -> List<&2, U32>
def H2.get32 source · line 64 · raw
@bs:List<&2, U32> -> U32
def H2.len source · line 71 · raw
@bs:List<&2, U32> -> U32
def H2.frame source · line 75 · raw
@+ty:U32 -> @+flags:U32 -> @+sid:U32 -> @payload:List<&2, U32> -> List<&2, U32>
A frame's bytes: its 9-byte header, then its payload.
def H2.preface source · line 82 · raw
List<&2, U32>
What a client sends first: "PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n".
def H2.rd_new source · line 103 · raw
@server:Bool -> FRd
def H2.rd_pre source · line 110 · raw
@ok:Bool -> @t:List<&2, U32> -> FStep
def H2.rd_body source · line 119 · raw
@+ty:U32 -> @+flags:U32 -> @+sid:U32 -> @+len:U32 -> @big:Bool -> @empty:Bool -> FStep
def H2.rd_head source · line 129 · raw
@acc:List<&2, U32> -> @+max:U32 -> FStep
The ninth header byte: the frame's length, type, flags and stream.
def H2.rd_more source · line 139 · raw
@+n:U32 -> @+acc:List<&2, U32> -> @+max:U32 -> @last:Bool -> FStep
def H2.rd_pay source · line 146 · raw
@+ty:U32 -> @+flags:U32 -> @+sid:U32 -> @+left:U32 -> @acc:List<&2, U32> -> @last:Bool -> FStep
def H2.rd_step source · line 153 · raw
@rd:FRd -> @+b:U32 -> @+max:U32 -> FStep
def H2.rd_add source · line 171 · raw
@got:Maybe<&2, Frame> -> @out:List<&2, Frame> -> List<&2, Frame>
def H2.rd_go source · line 178 · raw
@bs:List<&2, U32> -> @ev:FStep -> @+max:U32 -> @out:List<&2, Frame> -> FFed
def H2.read source · line 187 · raw
@rd:FRd -> @bs:List<&2, U32> -> @+max:U32 -> FFed
Feeds bytes to the reader: its next state and the frames they finished, refusing a frame longer than max.
def H2.bias source · line 243 · raw
U32
def H2.max_window source · line 246 · raw
U32
def H2.cfg source · line 251 · raw
@server:Bool -> H2Cfg
Our default settings: 100 streams at once, 1 MiB windows for each stream and 16 MiB for the connection, a 1 MiB header list.
def H2.setting source · line 254 · raw
@+id:U32 -> @+v:U32 -> List<&2, U32>
def H2.push_off source · line 258 · raw
@server:Bool -> List<&2, U32>
def H2.wu source · line 265 · raw
@+sid:U32 -> @+inc:U32 -> List<&2, U32>
def H2.start.go source · line 268 · raw
@server:Bool -> @first:List<&2, List<&2, U32>> -> List<&2, List<&2, U32>>
def H2.start source · line 275 · raw
@cfg:H2Cfg -> List<&2, List<&2, U32>>
def H2.next_first source · line 281 · raw
@server:Bool -> U32
def H2.new source · line 291 · raw
@cfg:H2Cfg -> H2
A new connection: a client's preface, SETTINGS and window update wait in its output; a server's SETTINGS and window update wait for the client's preface to be read, but may go at once (RFC 9113 3.4).
def H2.s_id source · line 301 · raw
@s:Strm -> U32
def H2.s_pick source · line 306 · raw
@s:Strm -> @other:Maybe<&2, Strm> -> @hit:Bool -> Maybe<&2, Strm>
def H2.s_keep source · line 313 · raw
@s:Strm -> @rest:List<&2, Strm> -> @keep:Bool -> List<&2, Strm>
def H2.s_put.go source · line 320 · raw
@old:Strm -> @t:List<&2, Strm> -> @+s:Strm -> @rec:List<&2, Strm> -> @hit:Bool -> List<&2, Strm>
def H2.out1 source · line 327 · raw
@c:H2 -> @bs:List<&2, U32> -> H2
def H2.ev1 source · line 332 · raw
@c:H2 -> @e:H2Ev -> H2
def H2.streams source · line 337 · raw
@c:H2 -> List<&2, Strm>
def H2.with_streams source · line 342 · raw
@c:H2 -> @nss:List<&2, Strm> -> H2
def H2.is_dead source · line 347 · raw
@c:H2 -> Bool
def H2.cfg_of source · line 352 · raw
@c:H2 -> H2Cfg
def H2.peer_of source · line 357 · raw
@c:H2 -> H2Peer
def H2.cont_of source · line 362 · raw
@c:H2 -> Maybe<&2, HCont>
def H2.with_cont source · line 367 · raw
@c:H2 -> @k:Maybe<&2, HCont> -> H2
def H2.last_of source · line 372 · raw
@c:H2 -> U32
def H2.cfg_server source · line 377 · raw
@cfg:H2Cfg -> Bool
def H2.server source · line 382 · raw
@c:H2 -> Bool
def H2.fail source · line 387 · raw
@c:H2 -> @+code:U32 -> @+why:String -> H2
A connection error: GOAWAY with code, the application told, and nothing more read or sent but what is queued.
def H2.s_get source · line 400 · raw
@ss:List<&2, Strm> -> @+sid:U32 -> Maybe<&2, Strm>
def H2.s_del source · line 407 · raw
@ss:List<&2, Strm> -> @+sid:U32 -> List<&2, Strm>
def H2.s_put source · line 415 · raw
@ss:List<&2, Strm> -> @+s:Strm -> List<&2, Strm>
Puts s in place of the stream with its id, or last when none has it.
def H2.s_count source · line 422 · raw
@ss:List<&2, Strm> -> @+server:Bool -> U32
def H2.s_done source · line 430 · raw
@s:Strm -> Bool
A stream both sides ended, with nothing left to send, is gone.
def H2.hty source · line 438 · raw
@first:Bool -> U32
def H2.flag source · line 445 · raw
@b:Bool -> @+bit:U32 -> U32
def H2.hblock source · line 454 · raw
@fuel:Nat -> @+sid:U32 -> @+first:Bool -> @+end:Bool -> @+bs:List<&2, U32> -> @+mf:U32 -> @out:List<&2, List<&2, U32>> -> @fits:Bool -> List<&2, List<&2, U32>>
A header block as HEADERS, then CONTINUATIONs of at most mf bytes; END_STREAM on the HEADERS frame, END_HEADERS on the last.
def H2.dsplit source · line 468 · raw
@fuel:Nat -> @+sid:U32 -> @+end:Bool -> @+bs:List<&2, U32> -> @+mf:U32 -> @out:List<&2, List<&2, U32>> -> @+n:U32 -> @fits:Bool -> List<&2, List<&2, U32>>
DATA frames of at most mf bytes, END_STREAM on the last if end. (n is bs's length, kept so no frame measures the rest again.)
def H2.frames source · line 480 · raw
@+n:U32 -> @+mf:U32 -> Nat
def H2.avail source · line 492 · raw
@+csw:U32 -> @+sw:U32 -> U32
def H2.d_head source · line 495 · raw
@b:0x3b6cf044a15b0f294883035a8a89b794/src/hpack.HEBlock -> @+id:U32 -> @+sw:U32 -> @+ru:U32 -> @+end:Bool -> @+re:Bool -> @+csw:U32 -> @+mf:U32 -> @out:List<&2, List<&2, U32>> -> DStep
def H2.d_data source · line 502 · raw
@+id:U32 -> @+sw:U32 -> @+ru:U32 -> @+le:Bool -> @+re:Bool -> @+csw:U32 -> @enc:0x3b6cf044a15b0f294883035a8a89b794/src/hpack.HEnc -> @+mf:U32 -> @out:List<&2, List<&2, U32>> -> @+bs:List<&2, U32> -> @+end:Bool -> @+n:U32 -> @+av:U32 -> @all:Bool -> @some:Bool -> DStep
def H2.d_one source · line 517 · raw
@ch:Chunk -> @ev:DEv -> DStep
One chunk of a stream's queue: headers always go; data as far as the windows allow.
def H2.d_fin source · line 528 · raw
@ev:DEv -> @q:List<&2, Chunk> -> DOut
def H2.drain source · line 533 · raw
@q:List<&2, Chunk> -> @st:DStep -> DOut
def H2.f_merge source · line 545 · raw
@d:DOut -> @+mf:U32 -> @kept:List<&2, Strm> -> FEv
def H2.f_one source · line 550 · raw
@s:Strm -> @ev:FEv -> FEv
def H2.f_go source · line 555 · raw
@ss:List<&2, Strm> -> @ev:FEv -> FEv
def H2.peer_mf source · line 562 · raw
@p:H2Peer -> U32
def H2.f_fin source · line 567 · raw
@c:H2 -> @ev:FEv -> H2
def H2.flush source · line 573 · raw
@c:H2 -> H2
Sends what every stream has queued, as far as the windows allow.
def H2.with_dec source · line 581 · raw
@c:H2 -> @d:0x3b6cf044a15b0f294883035a8a89b794/src/hpack.HDec -> H2
def H2.with_enc source · line 586 · raw
@c:H2 -> @e:0x3b6cf044a15b0f294883035a8a89b794/src/hpack.HEnc -> H2
def H2.enc_of source · line 591 · raw
@c:H2 -> 0x3b6cf044a15b0f294883035a8a89b794/src/hpack.HEnc
def H2.with_peer source · line 596 · raw
@c:H2 -> @p:H2Peer -> H2
def H2.with_last source · line 601 · raw
@c:H2 -> @+l:U32 -> H2
def H2.with_next source · line 606 · raw
@c:H2 -> @+n:U32 -> H2
def H2.with_csw source · line 611 · raw
@c:H2 -> @+w:U32 -> H2
def H2.csw_of source · line 616 · raw
@c:H2 -> U32
def H2.cfg_init source · line 621 · raw
@cfg:H2Cfg -> U32
def H2.cfg_cwin source · line 626 · raw
@cfg:H2Cfg -> U32
def H2.cfg_ms source · line 631 · raw
@cfg:H2Cfg -> U32
def H2.cfg_cap source · line 636 · raw
@cfg:H2Cfg -> U32
def H2.cfg_mf source · line 641 · raw
@cfg:H2Cfg -> U32
def H2.rst source · line 647 · raw
@+c:H2 -> @+sid:U32 -> @+code:U32 -> H2
Resets sid: RST_STREAM sent, the stream gone, the application told.
def H2.put_strm.go source · line 651 · raw
@+c:H2 -> @+s:Strm -> @done:Bool -> H2
def H2.put_strm source · line 659 · raw
@c:H2 -> @+s:Strm -> H2
Stores s, or drops it once both sides ended it and nothing waits.
def H2.bit source · line 662 · raw
@+flags:U32 -> @+b:U32 -> Bool
def H2.unpad.go source · line 667 · raw
@t:List<&2, U32> -> @+n:U32 -> @bad:Bool -> Maybe<&2, List<&2, U32>>
A payload less its padding (PADDED, 0x8); None when the padding is as long as the payload.
def H2.unpad source · line 675 · raw
@padded:Bool -> @p:List<&2, U32> -> Maybe<&2, List<&2, U32>>
def H2.unprio source · line 685 · raw
@prio:Bool -> @m:Maybe<&2, List<&2, U32>> -> Maybe<&2, List<&2, U32>>
A HEADERS payload less its priority fields (PRIORITY, 0x20).
def H2.crused_of source · line 696 · raw
@c:H2 -> U32
def H2.c_replenish.go source · line 701 · raw
@full:Bool -> @c:H2 -> H2
def H2.add_crused source · line 708 · raw
@c:H2 -> @+n:U32 -> H2
def H2.c_replenish source · line 714 · raw
@+c:H2 -> H2
Gives the connection's window back once half of it is used.
def H2.s_replenish.go source · line 717 · raw
@c:H2 -> @+id:U32 -> @+sw:U32 -> @+ru:U32 -> @+le:Bool -> @+re:Bool -> @q:List<&2, Chunk> -> @full:Bool -> H2
def H2.s_replenish source · line 725 · raw
@c:H2 -> @s:Strm -> @+half:U32 -> H2
Stores s, giving its window back once half of it is used.
def H2.data_ok source · line 733 · raw
@+c:H2 -> @d:Maybe<&2, List<&2, U32>> -> @s:Strm -> @+sid:U32 -> @+end:Bool -> @+n:U32 -> H2
def H2.data_s.go source · line 741 · raw
@+c:H2 -> @s:Strm -> @+sid:U32 -> @+flags:U32 -> @p:List<&2, U32> -> @+n:U32 -> @closed:Bool -> @over:Bool -> H2
def H2.data_s source · line 750 · raw
@+c:H2 -> @m:Maybe<&2, Strm> -> @+sid:U32 -> @+flags:U32 -> @p:List<&2, U32> -> @+n:U32 -> H2
def H2.data_in.go source · line 758 · raw
@+c:H2 -> @+sid:U32 -> @+flags:U32 -> @p:List<&2, U32> -> @+n:U32 -> @zero:Bool -> @over:Bool -> H2
def H2.data_in source · line 767 · raw
@+c:H2 -> @+sid:U32 -> @+flags:U32 -> @+p:List<&2, U32> -> H2
def H2.dec_of source · line 774 · raw
@c:H2 -> 0x3b6cf044a15b0f294883035a8a89b794/src/hpack.HDec
def H2.hdrs_old source · line 779 · raw
@c:H2 -> @s:Strm -> @+sid:U32 -> @hs:List<&2, 0x3b6cf044a15b0f294883035a8a89b794/src/http.Header> -> @+end:Bool -> H2
def H2.peer_init source · line 788 · raw
@p:H2Peer -> U32
def H2.hdrs_new source · line 794 · raw
@+c:H2 -> @+sid:U32 -> @hs:List<&2, 0x3b6cf044a15b0f294883035a8a89b794/src/http.Header> -> @+end:Bool -> @full:Bool -> H2
A peer's new stream: taken while under our limit, else refused.
def H2.hdrs_none source · line 803 · raw
@+c:H2 -> @+sid:U32 -> @hs:List<&2, 0x3b6cf044a15b0f294883035a8a89b794/src/http.Header> -> @+end:Bool -> @opens:Bool -> @closed:Bool -> H2
def H2.hdrs source · line 815 · raw
@+c:H2 -> @m:Maybe<&2, Strm> -> @+sid:U32 -> @hs:List<&2, 0x3b6cf044a15b0f294883035a8a89b794/src/http.Header> -> @+end:Bool -> H2
A header block is whole: a new stream's request, or headers or trailers on an open one.
def H2.block.got source · line 824 · raw
@+c:H2 -> @r:Result<&2, &2, String, 0x3b6cf044a15b0f294883035a8a89b794/src/hpack.HBlock> -> @+sid:U32 -> @+end:Bool -> H2
def H2.block source · line 831 · raw
@+c:H2 -> @+sid:U32 -> @+end:Bool -> @bs:List<&2, U32> -> H2
def H2.frag source · line 834 · raw
@+c:H2 -> @+sid:U32 -> @+end:Bool -> @+bs:List<&2, U32> -> @big:Bool -> @done:Bool -> H2
def H2.frag_in source · line 843 · raw
@+c:H2 -> @+sid:U32 -> @+end:Bool -> @+bs:List<&2, U32> -> @done:Bool -> H2
def H2.headers_in.go source · line 846 · raw
@+c:H2 -> @+sid:U32 -> @+flags:U32 -> @m:Maybe<&2, List<&2, U32>> -> H2
def H2.headers_in source · line 853 · raw
@+c:H2 -> @+sid:U32 -> @+flags:U32 -> @p:List<&2, U32> -> @zero:Bool -> H2
def H2.cont_in.go source · line 860 · raw
@+c:H2 -> @+ksid:U32 -> @+end:Bool -> @acc:List<&2, U32> -> @+flags:U32 -> @p:List<&2, U32> -> @ok:Bool -> H2
def H2.cont_in source · line 867 · raw
@+c:H2 -> @k:HCont -> @+ty:U32 -> @+sid:U32 -> @+flags:U32 -> @p:List<&2, U32> -> H2
def H2.s_shift source · line 875 · raw
@ss:List<&2, Strm> -> @+old:U32 -> @+new:U32 -> List<&2, Strm>
def H2.set_window.go source · line 882 · raw
@+c:H2 -> @+v:U32 -> @p:H2Peer -> H2
def H2.set_window source · line 887 · raw
@+c:H2 -> @+v:U32 -> @big:Bool -> H2
def H2.set_frame.go source · line 894 · raw
@c:H2 -> @+v:U32 -> @p:H2Peer -> H2
def H2.set_frame source · line 899 · raw
@+c:H2 -> @+v:U32 -> @bad:Bool -> H2
def H2.set_streams.go source · line 906 · raw
@c:H2 -> @+v:U32 -> @p:H2Peer -> H2
def H2.set_streams source · line 911 · raw
@+c:H2 -> @+v:U32 -> H2
def H2.set_push source · line 914 · raw
@+c:H2 -> @bad:Bool -> H2
def H2.set1 source · line 922 · raw
@+c:H2 -> @id:U32 -> @+v:U32 -> H2
One setting from the peer.
def H2.set_all source · line 937 · raw
@p:List<&2, U32> -> @c:H2 -> H2
def H2.ack_settings.go source · line 945 · raw
@c:H2 -> @dead:Bool -> H2
def H2.ack_settings source · line 952 · raw
@+c:H2 -> H2
def H2.settings_in.go source · line 955 · raw
@+c:H2 -> @p:List<&2, U32> -> @zero:Bool -> @ack:Bool -> @empty:Bool -> @whole:Bool -> H2
def H2.settings_in source · line 968 · raw
@+c:H2 -> @+sid:U32 -> @+flags:U32 -> @+p:List<&2, U32> -> H2
def H2.ping_in source · line 975 · raw
@+c:H2 -> @zero:Bool -> @eight:Bool -> @ack:Bool -> @p:List<&2, U32> -> H2
def H2.mine source · line 986 · raw
@+id:U32 -> @server:Bool -> Bool
def H2.refused.pick source · line 989 · raw
@+id:U32 -> @rest:List<&2, U32> -> @hit:Bool -> List<&2, U32>
def H2.refused source · line 997 · raw
@ss:List<&2, Strm> -> @+last:U32 -> @+server:Bool -> List<&2, U32>
The ids of our streams past last, which the peer's GOAWAY refused.
def H2.refuse_all source · line 1004 · raw
@ids:List<&2, U32> -> @+c:H2 -> H2
def H2.goaway_in source · line 1011 · raw
@+c:H2 -> @zero:Bool -> @short:Bool -> @+p:List<&2, U32> -> H2
def H2.wu_conn source · line 1022 · raw
@+c:H2 -> @+inc:U32 -> @zero:Bool -> @over:Bool -> H2
def H2.wu_strm.go source · line 1031 · raw
@+c:H2 -> @+inc:U32 -> @zero:Bool -> @over:Bool -> @s:Strm -> H2
def H2.wu_strm source · line 1040 · raw
@+c:H2 -> @m:Maybe<&2, Strm> -> @+inc:U32 -> H2
def H2.wu_in.go source · line 1048 · raw
@+c:H2 -> @+sid:U32 -> @+inc:U32 -> @conn:Bool -> H2
def H2.wu_in source · line 1055 · raw
@+c:H2 -> @+sid:U32 -> @four:Bool -> @+p:List<&2, U32> -> H2
def H2.rst_in.go source · line 1062 · raw
@+c:H2 -> @m:Maybe<&2, Strm> -> @+sid:U32 -> @+code:U32 -> H2
def H2.rst_in source · line 1069 · raw
@+c:H2 -> @+sid:U32 -> @zero:Bool -> @four:Bool -> @+p:List<&2, U32> -> H2
def H2.prio_in source · line 1078 · raw
@+c:H2 -> @+sid:U32 -> @zero:Bool -> @five:Bool -> H2
def H2.on.ty source · line 1090 · raw
@+c:H2 -> @ty:U32 -> @+flags:U32 -> @+sid:U32 -> @+p:List<&2, U32> -> H2
def H2.on.go source · line 1115 · raw
@dead:Bool -> @k:Maybe<&2, HCont> -> @+c:H2 -> @f:Frame -> H2
def H2.on source · line 1125 · raw
@+c:H2 -> @f:Frame -> H2
One frame from the peer.
def H2.on_all source · line 1131 · raw
@fs:List<&2, Frame> -> @c:H2 -> H2
def H2.rd_err source · line 1138 · raw
@+c:H2 -> @rd:FRd -> H2
def H2.rd_of source · line 1145 · raw
@c:H2 -> FRd
def H2.with_rd source · line 1150 · raw
@c:H2 -> @r:FRd -> H2
def H2.feed.got source · line 1155 · raw
@c:H2 -> @fed:FFed -> H2
def H2.feed source · line 1161 · raw
@+c:H2 -> @bs:List<&2, U32> -> H2
Bytes from the peer: the frames they finish, acted on in order.
def H2.next_of source · line 1170 · raw
@c:H2 -> U32
def H2.open.go source · line 1175 · raw
@+c:H2 -> @hs:List<&2, 0x3b6cf044a15b0f294883035a8a89b794/src/http.Header> -> @+end:Bool -> @+sid:U32 -> @ok:Bool -> H2Opened
def H2.open source · line 1185 · raw
@+c:H2 -> @hs:List<&2, 0x3b6cf044a15b0f294883035a8a89b794/src/http.Header> -> @+end:Bool -> H2Opened
A client's new stream: its request headers (end: no body follows) and its id; 0 when the connection is over or a GOAWAY came.
def H2.send.go source · line 1189 · raw
@c:H2 -> @m:Maybe<&2, Strm> -> @ch:Chunk -> H2
def H2.send source · line 1202 · raw
@+c:H2 -> @+sid:U32 -> @ch:Chunk -> H2
Queues headers (a response, or trailers: end) or data on sid, sent as soon as the windows allow; nothing on a stream that is gone or ended.
def H2.reset.go source · line 1205 · raw
@+c:H2 -> @m:Maybe<&2, Strm> -> @+sid:U32 -> @+code:U32 -> H2
def H2.reset source · line 1213 · raw
@+c:H2 -> @+sid:U32 -> @+code:U32 -> H2
Resets sid with code (CANCEL, say), unless it is gone.
def H2.close source · line 1218 · raw
@c:H2 -> @+code:U32 -> H2
Ends the connection: GOAWAY with code (NO_ERROR to close cleanly), after which nothing more is read or sent.
def H2.take source · line 1231 · raw
@c:H2 -> H2Take
What waits: the bytes to write, in order, and the events.
def H2.over source · line 1238 · raw
@c:H2 -> Bool
Whether the connection is over: once its bytes are written, close it.
def H2.take_bytes source · line 1241 · raw
@t:H2Take -> List<&2, U32>
def H2.take_evs source · line 1246 · raw
@t:H2Take -> List<&2, H2Ev>
def H2.opened source · line 1251 · raw
@o:H2Opened -> H2
def H2.opened_sid source · line 1256 · raw
@o:H2Opened -> U32