The Barter Server, once compiled and installed, can be invoked with the
barterd.start
command, installed by default in
/usr/local/barter/bin
. It can be shutdown with
barterd.stop
. These two programs are simply shell
scripts and invoke barterd
with certain default parameters,
so you may wish to edit them.
When the Barter Server is running, you can telnet to it. By default
it is configured to run on port 1134
. You will notice
that every message it sends back to you is in the following format:
[3-digit code] [human-readable description of code's meaning] [data, can be multiple lines or empty] .
The 3-digit code determines the meaning and context of the message.
You can see the symbolic names for these codes defined in the include
file bif.h
.
Commands that are sent to the server are simply command names with space-delimeted argument lists. Here are a few examples you can try:
denom_create foobar denom_read foobar user_create nothing user_read nothing balance event_send nothing Hello+Mr.+Nothing
However, you will probably find it more convenient to interact with
the Barter Server via the Perl client API. The module to use is
bif::client
. It contains methods for all of the Barter
Server commands as well as some wrappers to simplify compound operations
(like authentication).