package dream-httpaf
Internal: shared http/af stack for Dream (server) and Hyper (client)
Install
Dune Dependency
Authors
Maintainers
Sources
dream-1.0.0-alpha5.tar.gz
sha256=05bc7f6aff94893c151f3a5bcdee3328920c69b3763fac49ba27348dc7745901
md5=de6f6908ae899c9e85f2c751a0263932
doc/dream-httpaf.dream-h2/Dream_h2/Reqd/index.html
Module Dream_h2.Reqd
Source
Source
type response_state =
| Waiting
| Fixed of {
response : Response.t;
mutable iovec : [ `String of string | `Bigstring of Bigstringaf.t ] Httpaf.IOVec.t;
}
| Streaming of {
response : Response.t;
response_body : Body.Writer.t;
trailers : Headers.t;
}
| Complete of Response.t
Source
type request_info = {
request : Request.t;
request_body : Body.Reader.t;
mutable request_body_bytes : int64;
}
Source
type active_stream = {
body_buffer_size : int;
encoder : Dream_h2.Stream.Hpack.Encoder.t;
mutable response_state : response_state;
mutable trailers_parser : Stream.partial_headers option;
mutable trailers : Headers.t option;
create_push_stream : Stream_identifier.t -> (t, [ `Push_disabled | `Stream_ids_exhausted ]) result;
}
Source
val create_active_stream :
Dream_h2.Stream.Hpack.Encoder.t ->
int ->
(Stream_identifier.t ->
(t, [ `Push_disabled | `Stream_ids_exhausted ]) result) ->
active_stream
Source
val request :
(((request_info, request_info) Stream.active_state, 'a, request_info * 'b)
Stream.state,
'c,
'd)
Stream.stream ->
Request.t
Source
val request_body :
(((request_info, request_info) Stream.active_state, 'a, 'b) Stream.state,
'c,
'd)
Stream.stream ->
Body.Reader.t
Source
val response :
((('a, 'b) Stream.active_state, active_stream, 'c * active_stream)
Stream.state,
'd,
'e)
Stream.stream ->
Response.t option
Source
val response_exn :
((('a, 'b) Stream.active_state, active_stream, 'c * active_stream)
Stream.state,
'd,
'e)
Stream.stream ->
Response.t
Source
val send_fixed_response :
((('a, 'b) Stream.active_state, 'c, 'd) Stream.state, 'e, 'f) Stream.stream ->
active_stream ->
Response.t ->
[< `Bigstring of Bigstringaf.t | `String of string ] ->
unit
Source
val schedule_trailers :
((('a, 'b) Stream.active_state, active_stream, 'c) Stream.state, 'd, 'e)
Stream.stream ->
Headers.t ->
unit
Source
val unsafe_respond_with_data :
((('a, 'b) Stream.active_state, active_stream, 'b * active_stream)
Stream.state,
'c,
'd)
Stream.stream ->
Response.t ->
[< `Bigstring of Bigstringaf.t | `String of string ] ->
unit
Source
val respond_with_string :
((('a, 'b) Stream.active_state, active_stream, 'b * active_stream)
Stream.state,
'c,
'd)
Stream.stream ->
Response.t ->
string ->
unit
Source
val respond_with_bigstring :
((('a, 'b) Stream.active_state, active_stream, 'b * active_stream)
Stream.state,
'c,
'd)
Stream.stream ->
Response.t ->
Bigstringaf.t ->
unit
Source
val send_streaming_response :
flush_headers_immediately:bool ->
((('a, 'b) Stream.active_state, 'c, 'd) Stream.state, 'e, 'f) Stream.stream ->
active_stream ->
Response.t ->
Body.Writer.t
Source
val unsafe_respond_with_streaming :
((('a, 'b) Stream.active_state, active_stream, 'b * active_stream)
Stream.state,
'c,
'd)
Stream.stream ->
flush_headers_immediately:bool ->
Response.t ->
Body.Writer.t
Source
val respond_with_streaming :
((('a, 'b) Stream.active_state, active_stream, 'b * active_stream)
Stream.state,
'c,
'd)
Stream.stream ->
?flush_headers_immediately:bool ->
Response.t ->
Body.Writer.t
Source
val start_push_stream :
((('a, 'b) Stream.active_state, 'c, 'd) Stream.state, 'e, 'f) Stream.stream ->
active_stream ->
Request.t ->
(t, [ `Push_disabled | `Stream_cant_push | `Stream_ids_exhausted ]) result
Source
val unsafe_push :
((('a, 'b) Stream.active_state, active_stream, 'c) Stream.state, 'd, 'e)
Stream.stream ->
Request.t ->
(t, [ `Push_disabled | `Stream_cant_push | `Stream_ids_exhausted ]) result
Source
val push :
((('a, 'b) Stream.active_state, active_stream, 'c) Stream.state, 'd, 'e)
Stream.stream ->
Request.t ->
(t, [ `Push_disabled | `Stream_cant_push | `Stream_ids_exhausted ]) result
Source
val report_error :
(((request_info, request_info) Stream.active_state,
active_stream,
request_info * active_stream)
Stream.state,
error,
error_handler)
Stream.stream ->
error ->
Error_code.t ->
unit
Source
val report_exn :
(((request_info, request_info) Stream.active_state,
active_stream,
request_info * active_stream)
Stream.state,
error,
error_handler)
Stream.stream ->
exn ->
unit
Source
val try_with :
(((request_info, request_info) Stream.active_state,
active_stream,
request_info * active_stream)
Stream.state,
error,
error_handler)
Stream.stream ->
(unit -> 'a) ->
(unit, exn) Result.result
Source
val error_code :
((('a, 'b) Stream.active_state, 'c, 'd) Stream.state,
[> `Exn of exn ] as 'e,
'f)
Stream.stream ->
'e option
Source
val requires_output :
((('a, 'b) Stream.active_state, active_stream, 'c) Stream.state, 'd, 'e)
Stream.stream ->
bool
Source
val flush_request_body :
(((request_info, request_info) Stream.active_state,
active_stream,
request_info * active_stream)
Stream.state,
error,
error_handler)
Stream.stream ->
unit
Source
val write_buffer_data :
Dream_h2.Stream.Writer.t ->
off:int ->
len:int ->
Dream_h2__Serialize.frame_info ->
[< `Bigstring of Bigstringaf.t | `String of string ] ->
unit
Source
val close_stream :
((('a, 'b) Stream.active_state, 'c, 'd) Stream.state, 'e, 'f) Stream.stream ->
unit
Source
val flush_response_body :
((('a, 'b) Stream.active_state, active_stream, 'c) Stream.state, 'd, 'e)
Stream.stream ->
max_bytes:int ->
int
Source
val deliver_trailer_headers :
((('a, 'b) Stream.active_state, active_stream, 'c) Stream.state, 'd, 'e)
Stream.stream ->
Headers.t ->
unit
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>