module MongoHeader: sig
.. end
This module defines the header for every message sent to or received from MongoDB.
type
t
type of header
: int -> int32 -> int32 -> MongoOperation.t -> t
create a general header. e.g. create_header body_len request_id response_to op
: int -> int32 -> MongoOperation.t -> t
create a request header. e.g. create_request_header body_len request_id op. The only difference from create_header is that parameter response_to is not necessary here
val get_message_len : t -> int32
get the message length out of a header
val get_request_id : t -> int32
get the request id out of a header
val get_response_to : t -> int32
get the response_to id out of a header
val get_op : t -> MongoOperation.t
get the operation out of a header
: t -> string
encode the header to string, so it can be combined with the message body and sent
: string -> t
decode a str (received from MongoDB) to a header
val to_string : t -> string
convert a header to a human readable string