Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
type code =
| Empty
| Request of [ `Get | `Post | `Put | `Delete ]
| Response of [ `Created
| `Deleted
| `Valid
| `Changed
| `Content
| `Bad_request
| `Unauthorized
| `Bad_option
| `Forbidden
| `Not_found
| `Method_not_allowed
| `Not_acceptable
| `Precondition_failed
| `Request_entity_too_large
| `Unsupported_content_format
| `Internal_server_error
| `Not_implemented
| `Bad_gateway
| `Service_unavailable
| `Gateway_timeout
| `Proxying_not_supported ]
val pp_code : Stdlib.Format.formatter -> code -> unit
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
val make :
?version:int ->
?id:int ->
?token:string ->
code:code ->
?kind:kind ->
?options:option list ->
?client_addr:string ->
buffer ->
t
Coap message constructor.
val version : t -> int
val id : t -> int
val token : t -> string
Message token used to match a response with a request.
Token values may be 0 to 8 bytes in length.
val path : t -> string list
Extract request path from message options.
val client_addr : t -> string Stdlib.Option.t
val payload_length : t -> int
val buffer_to_string : buffer -> string
val buffer_of_string : string -> buffer
val is_confirmable : t -> bool
val pp : Stdlib.Format.formatter -> t -> unit