package procord

  1. Overview
  2. Docs
type error =
  1. | E_task_not_supported
  2. | E_unexpected_message
  3. | E_ill_formed_message
  4. | E_message_too_long
  5. | E_disconnected
  6. | E_invalid_print_destination
exception Error of error
val error : error -> 'a
val error_message : error -> string
type custom_destination = char
type print_destination =
  1. | D_stdout
  2. | D_stderr
  3. | D_custom of custom_destination
type message =
  1. | M_none
  2. | M_value of string
  3. | M_task_name of string
  4. | M_exception of string
  5. | M_unknown_exception of string
  6. | M_error of error
  7. | M_print of print_destination * string
  8. | M_flush of print_destination
val set_max_message_size : int -> unit
val send : 'a Procord_connection.t -> message -> unit
val send_value : 'a Procord_connection.t -> string -> unit
val send_task_name : 'a Procord_connection.t -> string -> unit
val send_exception : 'a Procord_connection.t -> string -> unit
val send_unknown_exception : 'a Procord_connection.t -> string -> unit
val send_error : 'a Procord_connection.t -> error -> unit
val send_print : 'a Procord_connection.t -> print_destination -> string -> unit
val send_flush : 'a Procord_connection.t -> print_destination -> unit
val receive : 'a Procord_connection.t -> message
val blocking_receive : 'a Procord_connection.t -> message
val blocking_receive_task_name : 'a Procord_connection.t -> string
val blocking_receive_value : 'a Procord_connection.t -> string
val register_destination : custom_destination -> Format.formatter -> unit
val formatter_of_destination : print_destination -> Format.formatter option