Hcs.Websocket.Opcode

hcs · API reference

WebSocket frame opcode

type t = 
  | Continuation (* 0x0 *)
  | Text (* 0x1 *)
  | Binary (* 0x2 *)
  | Close (* 0x8 *)
  | Ping (* 0x9 *)
  | Pong (* 0xA *)
  | Ctrl of int (* Other control opcodes *)
  | Nonctrl of int (* Other non-control opcodes *)
val to_int : t -> int
val of_int : int -> t
val int_to_string : int -> string
val to_string : t -> string
val is_control : t -> bool