Module Coap_core__.Coap_message
val let* : ('a, 'b) Stdlib.result -> ('a -> ('c, 'b) Stdlib.result) -> ('c, 'b) Stdlib.result
val return : 'a -> ('a, 'b) Stdlib.result
val pp_kind : Stdlib.Format.formatter -> kind -> unit
val kind_of_int : int -> kind
val kind_to_int : kind -> int
type code
=
val dump_request_kind : Stdlib.Format.formatter -> [< `Delete | `Get | `Post | `Put ] -> unit
val dump_response_kind : Stdlib.Format.formatter -> [< `Bad_gateway | `Bad_option | `Bad_request | `Changed | `Content | `Continue | `Created | `Deleted | `Forbidden | `Gateway_timeout | `Internal_server_error | `Method_not_allowed | `Not_acceptable | `Not_found | `Not_implemented | `Precondition_failed | `Proxying_not_supported | `Request_entity_incomplete | `Request_entity_too_large | `Service_unavailable | `Too_many_requests | `Unauthorized | `Unsupported_content_format | `Valid ] -> unit
val pp_code : Stdlib.Format.formatter -> code -> unit
type content_format
=[
|
`Text of [ `Plain ]
|
`Application of [ `Link_format | `Xml | `Octet_stream | `Exi | `Json ]
]
module Header : sig ... end
type option
=
|
If_match of string
|
Uri_host of string
|
Etag of string
|
If_none_match
|
Uri_port of int
|
Location_path of string
|
Uri_path of string
|
Content_format of content_format
|
Max_age of int
|
Uri_query of string
|
Accept of int
|
Location_query of string
|
Proxy_uri of string
|
Proxy_scheme of string
|
Size1 of int
module Option : sig ... end
type t
=
{
header : Stdlib.Int32.t;
token : string;
options : option list;
payload : string;
}
val pp_options : Stdlib.Format.formatter -> option list -> unit
val version : t -> int
val kind : t -> kind
val code : t -> code
val id : t -> int
val token : t -> string
val options : t -> option list
val payload : t -> string
val path : t -> string list
val payload_marker : int
val header_length : int
val is_confirmable : t -> bool
val length : t -> int
val decode : string -> (t, [> `Invalid_option_delta | `Invalid_option_length | `Invalid_token_length ]) Stdlib.result
val encode_header : Cstruct.t -> int -> Cstruct.uint32 -> int
val encode_token : Cstruct.t -> int -> string -> int
val encode_option_part : int -> int
val put_option_part : data:Cstruct.t -> i:int -> length:int -> int -> int
val encode_options : Cstruct.t -> int -> option list -> int
val encode_payload : Cstruct.t -> int -> string -> int
val encode : t -> string
val gen_id : unit -> int
val make : ?version:int -> ?id:int -> ?token:string -> code:code -> ?kind:kind -> ?options:option list -> string -> t
val pp : Stdlib.Format.formatter -> t -> unit
val max_size : int