Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Simple asynchronous networking in ocaml.
OCaml C
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
codegen
eventloop
protocols
.gitignore
LICENSE
META
Makefile
OMakefile
OMakeroot
README
_tags
all.itarget
myocamlbuild.ml

README

Sonet is a collection of modules for asynchronous network
applications.  It is intended as a simpler alternative to the use of
the impressive ocamlnet package(s).

The modules contain an eventloop implementation, and parsers for some
common protocols.

The eventloop module is based on epoll for Linux, and defaults to
OCaml's Unix.select on other platforms.  It should be straightforward
to bind to alternatives like kqueue on other platforms.

Parsers and connection implementations exist for the HTTP/1.1 and
D-Bus protocols.  Parsers also exist for the JSON, JSONRPC and Bencode
formats.

Two code-generators are provided to ease the use of JSON and JSONRPC.
One (json_convert) generates code to convert between OCaml native
types and JSON.  Another (gen_rpc) generates code for the client and
server portions of a JSONRPC server, using an IDL description for the
messages in the RPC protocol.

Dependencies:
-------------

OCaml 3.12+

Building:
---------

Sonet can be built using ocamlbuild (via make) or OMake.  The build
using ocamlbuild does not currently build the JSON code-generators;
the build using OMake is comprehensive.

Installing:
-----------

Installation currently uses the ocamlbuild build and depends on
findlib.

$ make && make install

Uninstalling:
-------------

From source directory:

$ make uninstall

Otherwise:

$ ocamlfind remove sonet

For system-wide OCaml installations, the install and uninstall
commands above will have to be run as root.
Something went wrong with that request. Please try again.