-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
54 lines (37 loc) · 1.44 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
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.