package mqtt

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type t
type 'a monad = 'a Lwt.t
type qos =
  1. | Atmost_once
  2. | Atleast_once
  3. | Exactly_once
type cxn_flags =
  1. | Will_retain
  2. | Will_qos of qos
  3. | Clean_session
type cxn_userpass =
  1. | Username of string
  2. | UserPass of string * string
type cxn_data = {
  1. clientid : string;
  2. userpass : cxn_userpass option;
  3. will : (string * string) option;
  4. flags : cxn_flags list;
  5. timer : int;
}
type cxnack_flags =
  1. | Cxnack_accepted
  2. | Cxnack_protocol
  3. | Cxnack_id
  4. | Cxnack_unavail
  5. | Cxnack_userpass
  6. | Cxnack_auth
type msg_data =
  1. | Connect of cxn_data
  2. | Connack of cxnack_flags
  3. | Subscribe of int * (string * qos) list
  4. | Suback of int * qos list
  5. | Unsubscribe of int * string list
  6. | Unsuback of int
  7. | Publish of int option * string * string
  8. | Puback of int
  9. | Pubrec of int
  10. | Pubrel of int
  11. | Pubcomp of int
  12. | Pingreq
  13. | Pingresp
  14. | Disconnect
  15. | Asdf
type pkt_opt = bool * qos * bool
val connect : ?userpass:cxn_userpass -> ?will:(string * string) -> ?flags:cxn_flags list -> ?timer:int -> ?opt:pkt_opt -> string -> string
val connack : ?opt:pkt_opt -> cxnack_flags -> string
val publish : ?opt:pkt_opt -> ?id:int -> string -> string -> string
val puback : int -> string
val pubrec : int -> string
val pubrel : ?opt:pkt_opt -> int -> string
val pubcomp : int -> string
val subscribe : ?opt:pkt_opt -> ?id:int -> (string * qos) list -> string
val suback : ?opt:pkt_opt -> int -> qos list -> string
val unsubscribe : ?opt:pkt_opt -> ?id:int -> string list -> string
val unsuback : int -> string
val pingreq : unit -> string
val pingresp : unit -> string
val disconnect : unit -> string
val read_packet : t -> (pkt_opt * msg_data) monad
val tests : OUnit.test list
module MqttClient : sig ... end
module MqttServer : sig ... end