![]() |
zeep::http::daemon — A class to create daemon processes easily.
// In header: <zeep/http/daemon.hpp> class daemon { public: // types typedef basic_server *()> ; // The factory for creating server instances. // construct/copy/destruct (, , , ); (, ); // public member functions (, ); (, , , , ); (); (); (); (, ); // private member functions (); (); (, , , , ); (); };
In UNIX a daemon is a process that runs in the background. In the case of libzeep this is of course serving HTTP requests. stderr and stdout are captured and written to the log files specified and a process ID is store in the pid file which allows checking the status of a running daemon.
daemon
public
construct/copy/destruct( factory, pid_file, stdout_log_file, stderr_log_file);constructor with separately specified files
Parameters: |
|
( factory, name);constructor with default files
Parameters: |
|
daemon
public member functions( nr_of_restarts, within_nr_of_seconds);Avoid excessive automatic restart due to failing to start up.
Parameters: |
|
( address, port, nr_of_procs, nr_of_threads, run_as_user);Start the daemon, forking off in the background.
Parameters: |
|
();Stop a running daemon process. Returns 0 in case of successfully stopping a process.
();Returns 0 if the daemon is running.
();Force the running daemon to restart.
( address, port);Run the server without forking to the background.
For debugging purposes it is sometimes useful to start a server without forking so you can see the stdout and stderr. Often this is done by adding a –no-daemon flag to the program options.