sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page
Paf_mirageSourcemodule Make
(Time : Mirage_time.S)
(Stack : Tcpip.Tcp.S) :
S
with type stack = Stack.t
and type TCP.flow = Stack.flow
and type ipaddr = Stack.ipaddrThe client implementation of Paf_mirage does not strictly need a functor. Indeed, the client was made in the sense of mimic. The user should provide a Mimic.ctx which generate a paf_transmission. By this way, the run function is able to introspect the used protocol (regardless its implementation) and do the ALPN challenge with the server.
val run :
sleep:Paf.sleep ->
ctx:Mimic.ctx ->
error_handler:(Mimic.flow -> Alpn.client_error -> unit) ->
response_handler:(Mimic.flow -> Alpn.response -> Alpn.body -> unit) ->
[ `V1 of Httpaf.Request.t | `V2 of H2.Request.t ] ->
(Alpn.body, [> Mimic.error ]) result Lwt.trun ~ctx ~error_handler ~response_handler req sends an HTTP request (H2 or HTTP/1.1) to a peer which can be reached via the given Mimic's ctx. If the connection is recognized as a tls_protocol, we proceed an ALPN challenge between what the user chosen and what the peer can handle. Otherwise, we send a simple HTTP/1.1 request or a h2c request.