20 lines
451 B
OCaml
20 lines
451 B
OCaml
include Irc
|
|
module Dllist = Lwt_dllist
|
|
|
|
type sockaddr = Unix.sockaddr
|
|
type fd = Lwt_unix.file_descr
|
|
|
|
let pp_sockaddr ppf = function
|
|
| Unix.ADDR_INET (adr, port) -> Fmt.pf ppf "%s:%d" (Unix.string_of_inet_addr adr) port
|
|
| Unix.ADDR_UNIX path -> Fmt.string ppf path
|
|
|
|
let defer f =
|
|
Lwt.on_success (Lwt.pause ()) f
|
|
|
|
module Result_syntax = struct
|
|
let ( let* ) = Result.bind
|
|
let ( let+ ) r f = Result.map f r
|
|
end
|
|
|
|
include (val Logging.logs "Irc")
|