Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
val recv_hdr : transport -> (id option * response_hdr) Lwt.t
val recv_body :
transport ->
request_hdr ->
response_hdr ->
response_body ->
(unit, Protocol.Error.t) result Lwt.t
recv_body transport request_hdr response_hdr response_body
returns Ok ()
and receives and writes the body of the response into response_body
if the request has been successful, otherwise returns an Error
. The request_hdr
parameter is the output of a preceding recv_hdr
call.
val send_one : transport -> request_hdr -> request_body -> unit Lwt.t
Send a single request. Invocations of this function will not be interleaved because they are protected by a mutex
val id_of_request : request_hdr -> id
val handle_unrequested_packet : transport -> response_hdr -> unit Lwt.t