Server to client communication module
Author(s): Arsen Kostenko.This module describes the server-2-client side behavior of any node. Since the behavior is not very different this module shares a number of fearures with dht_s2c.pl:
- extensive usage of the Ciao threading mechanism;
- interface made as simple as possible;
- dht_server.pl module is the only usage point;
- parameters are passed through the dht_config.pl module.
Usage and interface
- Library usage:
:- use_module(library(dht_s2c)). - Exports:
- Predicates:
dht_s2c_main/0.
- Predicates:
- Imports:
- System library modules:
sockets/sockets, concurrency/concurrency, dht/dht_config, dht/dht_misc, dht/dht_logic, dht/dht_logic_misc. - Packages:
prelude, nonpure, assertions, regtypes, isomodes.
- System library modules:
Documentation on exports
PREDICATE
Generally speaking, this predicate must perform some common tasks like:
- listen to a port for incoming connections from clients,
- and process requests from clients.