September 2013
Intermediate to advanced
548 pages
12h 25m
English
We’ll start with a simple example that shows how to
use lib_chan. We’re going to create a simple
server that can compute factorials and Fibonacci
numbers. We’ll protect it with a password.
The server will operate on port 2233.
We’ll take four steps to create this server.
Write a configuration file.
Write the code for the server.
Start the server.
Access the server over the network.
Here’s the configuration file for our example:
| socket_dist/config1 | |
| | {port, 2233}. |
| | {service, math, password, "qwerty", mfa, mod_math, run, []}. |
The configuration file has a number of
service tuples of this form:
| | {service, <Name>, password, <P>, mfa, <Mod>, <Func>, <ArgList>} |
The arguments are delimited by the atoms service ...
Read now
Unlock full access