package irc-client

  1. Overview
  2. Docs

Module type Irc_transport.IOSource

Sourcetype 'a t
Sourceval (>>=) : 'a t -> ('a -> 'b t) -> 'b t
Sourceval (>|=) : 'a t -> ('a -> 'b) -> 'b t
Sourceval return : 'a -> 'a t
Sourcetype file_descr

A connection to the remote IRC server

Sourcetype inet_addr

Remote addresses

Sourcetype config

Additional configuration, on a per-connection basis.

Sourceval open_socket : ?config:config -> inet_addr -> int -> file_descr t
Sourceval close_socket : file_descr -> unit t
Sourceval read : file_descr -> Bytes.t -> int -> int -> int t
Sourceval write : file_descr -> Bytes.t -> int -> int -> int t
Sourceval read_with_timeout : timeout:int -> file_descr -> Bytes.t -> int -> int -> int option t

read_with_timeout ~timeout fd buf off len returns Some n if it could read n bytes into buf (slice off,...,off+len-1), or None if nothing was read before timeout seconds.

Sourceval gethostbyname : string -> inet_addr list t

List of IPs that correspond to the given hostname (or an empty list if none is found)

Sourceval iter : ('a -> unit t) -> 'a list -> unit t
Sourceval catch : (unit -> 'a t) -> (exn -> 'a t) -> 'a t

Catch asynchronous exception

  • since NEXT_RELEASE
Sourceval sleep : int -> unit t
Sourceval time : unit -> float

Current wall time (used for timeouts). Typically, Unix.time.

  • since NEXT_RELEASE
Sourceval pick : ('a t list -> 'a t) option

OPTIONAL pick l returns the first thread of l that terminates (and might cancel the others)