Skip to content
Stephen Oliver edited this page Apr 3, 2017 · 1 revision

AdaFN is a high-level library that allows easy writing of client programs in the Ada language.

Features

  • High-level model of the protocol, no need to mess with string properties, robust type model.
  • Thread-safe
  • Supports:
    • Synchronous calls.
    • Asynchronous calls (with optional callbacks for transaction tracking).
  • Example programs for key retrieval, file/folder insertion.

Download

Clone from Github

Included examples

$ adafn_getkey -k <key> [-v] [-f] [--max-size <n>] [--retries <n>] [--name <name>] [--global]
-v             : verbose.
-f             : follow redirects.
--max-size     : limit of bytes to retrieve.
--retries      : attemps in case of failure.
--name         : use supplied name for the client connection.
--global       : show in node global queue.
$ adafn_putfile --key <key> --name <name> --source <data> [-v] [-q] [--wait] [--uncompressed] [--source-kind <direct|directfromdisk|disk|redirect>]
--name         : use supplied name for the client connection.
--source       : data to be inserted for 'direct' mode, filename for 'disk' or 'directfromdisk' mode, key for 'redirect' mode.
-v             : verbose.
-q             : quiet.
--wait         : wait for insertion completion without returning control to shell.
--uncompressed : instruct the node not to compress the data.
--source-kind  : direct        : insert data given in the command line ('--source' argument)
	         directfromdisk: use direct insertion (passed to the node using the connection) for data located in the local filesystem.
	                         This mode allows to insert local files in a remote node.
	         disk          : pass a filename to the node; it reads and inserts that file (which must reside in the same filesystem as the node).
	         redirect      : a redirection is created, no actual data has to be supplied.
$ adafn_putdir --key <key> --dir <folder> [--default_file <filename>] [-v] [--uncompressed] [--local-queue] [--direct]
-v             : verbose.
--default-file : default file returned by the node for incomplete requests (typically index.html for freesites).
--uncompressed : instruct the node not to compress the data.
--local-queue  : avoid the use of the global queue (insertion will not be persistent).
--direct       : use direct insertion (needed when the node is remote); disk insertion attempted otherwise (folder must be accesible by the node).

Attempts to retrieve KSK@gpl.txt in blocking and non-blocking mode:

$ adafn_test
Clone this wiki locally