blob: cee6d1d73cf801b6c6efde3ee60348d933589cfb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
To build this library you will need GNU Make installed and any modern C compiler. Library is tested on Linux, *BSD and macOS operating systems.
First you need to create features.mk makefile:
cp src/platform/posix/features_tmpl.mk src/platform/posix/features.mk
Edit it according to your needs. Defaults are fine. Note that with_rbuf and with_msgq are experimental features and should not be used in production.
To (re)build library, utilities and tests simply do:
./build.sh (MAKE=gmake ./build.sh on *BSD systems)
In tests subdirectory you will find simple test examples. To test vc_server and vc_client (vconn feature) do:
mkdir test/keys
util/keygen test/keys/n1.pub test/keys/n1.priv
util/keygen test/keys/n2.pub test/keys/n2.priv
util/keygen test/keys/n3.pub test/keys/n3.priv
util/keygen test/keys/server.pub test/keys/server.priv
cd test
Then launch servers (each in its own terminal):
./vcs 0.0.0.0:3001 keys/n1.priv
./vcs 0.0.0.0:3002 keys/n2.priv 127.0.0.1:3001 keys/n1.pub
./vcs 0.0.0.0:3003 keys/n3.priv 127.0.0.1:3002 keys/n2.pub
./vc_server keys/server.priv 127.0.0.1:3001 keys/n1.pub keys/n2.pub keys/n3.pub
./vc_client keys/server.pub 127.0.0.1:3001 keys/n1.pub keys/n2.pub keys/n3.pub
|