package cry

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type operation = [
  1. | `Both
  2. | `Read
  3. | `Write
]
type transport = {
  1. write : Bytes.t -> int -> int -> int;
  2. read : Bytes.t -> int -> int -> int;
  3. wait_for : operation -> float -> bool;
  4. close : unit -> unit;
}
val register_ssl : (?bind:string -> Unix.sockaddr -> transport) -> unit
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. | Ssl_unavailable
  8. | Not_connected
  9. | Invalid_usage
  10. | Bad_answer of string option
  11. | Http_answer of int * string * string
exception Error of error
val string_of_error : exn -> string
type verb =
  1. | Put
  2. | Post
  3. | Source
type protocol =
  1. | Icy
  2. | Http of verb
  3. | Https of verb
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 mount =
  1. | Icy_id of int
  2. | Icecast_mount of string
type connection = {
  1. mount : mount;
  2. user : string;
  3. password : string;
  4. host : string;
  5. port : int;
  6. chunked : bool;
  7. content_type : content_type;
  8. protocol : protocol;
  9. 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. transport : transport;
}
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 -> ?chunked:bool -> ?password:string -> ?protocol:protocol -> ?user:string -> mount:mount -> 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:mount -> ?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.