D A E M O N
63
63
63
63
6.3. Calling up the process from a
client program
How to call up the process from a client program. The
example.
$"
To call up the existing daemon process from the client program,
follow these steps:
1. Create
a
socket.
2. Link the socket to the Daemon program.
3. Type the corresponding command string into the socket.
The general format of the string is:
<flags>date_and_time:command param
The
<flags>
substring must be substituted with the following values:
•
0
— the
command param
substring transfers the file
name and parameters of the command line. In the
simplest case, just the file name will be transferred. In
this case the string can look similar to the following:
<0>27 Mar 13:40:11:/tmp/test.tgz.
In a more complicated
case, the file name and parameters of the command
line will be transferred. In this case
the general format of the string is:
<flags>date_and_time:
0xfeparameter1[|parameter2[|parameter3[…]]]
0xfepath1[;path2[;path3[…]]]
where:
°
0xfe
defines the section beginning;
°
[parameterN]
defines the corresponding command
line parameter (without the leading character "
–
");
°
pathN
defines the corresponding path to the location
to be checked.
The number of paths and parameters is unlimited.