package cry

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type error =
  1. | Create of exn
  2. | Connect of exn
  3. | Close of exn
  4. | Write of exn
  5. | Read of exn
  6. | Busy
  7. | Not_connected
  8. | Invalid_usage
  9. | Bad_answer of string option
  10. | Http_answer of int * string * string
exception Error of error
val string_of_error : exn -> string
type protocol =
  1. | Icy
  2. | Http
val string_of_protocol : protocol -> string
type content_type
val ogg_application : content_type
val ogg_audio : content_type
val ogg_video : content_type
val mpeg : content_type
val content_type_of_string : string -> content_type
val string_of_content_type : content_type -> string
type connection = {
  1. mount : string;
  2. user : string;
  3. password : string;
  4. host : string;
  5. port : int;
  6. content_type : content_type;
  7. protocol : protocol;
  8. headers : (string, string) Hashtbl.t;
}
val string_of_connection : connection -> string
type audio_info = (string, string) Hashtbl.t
type metadata = (string, string) Hashtbl.t
type connection_data = {
  1. connection : connection;
  2. data_socket : Unix.file_descr;
}
type status =
  1. | Connected of connection_data
  2. | Disconnected
type t
val create : ?ipv6:bool -> ?bind:string -> ?connection_timeout:float -> ?timeout:float -> unit -> t
val get_status : t -> status
val get_icy_cap : t -> bool
val get_connection_data : t -> connection_data
val audio_info : ?samplerate:int -> ?channels:int -> ?quality:float -> ?bitrate:int -> unit -> audio_info
val connection : ?user_agent:string -> ?name:string -> ?genre:string -> ?url:string -> ?public:bool -> ?audio_info:audio_info -> ?description:string -> ?host:string -> ?port:int -> ?password:string -> ?protocol:protocol -> ?user:string -> mount:string -> content_type:content_type -> unit -> connection
val connect : t -> connection -> unit
val update_metadata : ?charset:string -> t -> metadata -> unit
val manual_update_metadata : host:string -> port:int -> protocol:protocol -> user:string -> password:string -> mount:string -> ?connection_timeout:float -> ?timeout:float -> ?headers:(string, string) Hashtbl.t -> ?ipv6:bool -> ?bind:string -> ?charset:string -> metadata -> unit
val send : t -> string -> unit
val close : t -> unit
OCaml

Innovation. Community. Security.