package irky-eio

All checked builds pass
  1. Overview
  2. Docs
IRC client library using Eio

Install

dune-project
 Dependency

Authors

Maintainers

Sources

irky-0.1.tbz
sha256=54540ee1cd7584dd5f07cd7e2141835978dc9ef4d080c20acb40dd6cd027fde4
sha512=b49bb10e274bcc7d69e65954ebb8f927a09d9eb9a8ce1c4b1510c574d11f7209cf4837c68c8c3d84bf4d86bcb10a72e7b3c5c7234f3bda995bbc57921af92171

Description

Added to opam-repository:

README

Irky

A fork of irc-client focused on direct style IOs (unix and Eio).

build

License

MIT

Usage

Simple bot which connects to a channel, sends a message, and then logs all messages in that channel to stdout:

module C = Irky.Client

let host = ref "irc.libera.chat"
let port = ref 6667
let nick = ref "irkytest"
let channel = ref "##demo_irc"

let on_msg _client msg =
  Printf.printf "Got message: %s\n%!" (Irky.Message.to_string msg)

let() =
  let io = Irky_unix.io in
  C.reconnect_loop ~reconnect_delay:15. ~io
    ~connect:(fun () ->
      C.connect_by_name ~server:!host ~port:!port ~nick:!nick ~io ())
    ~on_connect:(fun client ->
      Printf.printf "Connected, sending join for %S\n%!" !channel;
      C.send_join client ~channel:!channel;
      C.send_privmsg client ~target:!channel ~message:"hello from irky!")
    on_msg

Compile the above with:

ocamlfind ocamlopt -package irky -package irky.unix -linkpkg code.ml

Alternatively, you can find an extended version of this example in examples/example.ml; run it using dune exec -- examples/example.exe.

Dependencies (7)

  1. base64 >= "3.5"
  2. logs
  3. irky = version
  4. eio-ssl >= "0.3"
  5. eio >= "1.2"
  6. ocaml >= "5.0"
  7. dune >= "3.0"

Dev Dependencies (2)

  1. odoc with-doc
  2. eio_main with-test

Optional Dependencies

None

Used by

None

Conflicts

None

Build status

Results of building irky-eio with each compiler on check.ci.ocaml.org, run of against opam-repository 8a77e58. All results for this package.

Each result links to its build log. To keep crawlers from overloading the site, build logs require a GitHub sign-in (see ocurrent/opam-health-check). On your first log, GitHub asks you to “Authorize opam-health-check”, the OCurrent app that runs these checks; it sees only your public profile, not your repositories. The sign-in lasts 30 days.

Version OCaml 4.11 OCaml 4.14 OCaml 5.2 OCaml 5.4 OCaml 5.5
0.1 (this version) n/a n/a good good good
  • good Package successfully built
  • partial One of the dependencies failed to build
  • bad Package failed to build
  • n/a Package is not available in this environment
  • internal Internal failure