server.cpp File Reference

main driver code for a FountainServer object More...

#include "define.h"
#include "FountainServer.h"
#include "FountainErrors.h"
#include "Enforce.h"
#include <bamboo/qLog.h>
#include <bamboo/ConfigReader.h>
#include <bamboo/TypeConvert.h>
#include <bamboo/Daemonizer.h>
#include <bamboo/libbamboo.h>
#include <csignal>
#include <cerrno>
#include <cstddef>
#include <iostream>
#include <string>

Functions

void interruptHandler (int signalNumber)
 Called when we catch a signal.
int Daemonize ()
 Function to turn this process into a daemon.
bool initialize ()
 Performs initialization work for the master and slave Fountain node daemons.


Detailed Description

main driver code for a FountainServer object


Function Documentation

int Daemonize  ) 
 

Function to turn this process into a daemon.

Return values:
int SUCCESS if the daemonizing was successful
int FAILURE otherwise

bool initialize  ) 
 

Performs initialization work for the master and slave Fountain node daemons.

This function does two important things, registering for signal events and initializing the Bamboo library.

Return values:
bool true if initialization was successfull
false otherwise

void interruptHandler int  signalNumber  ) 
 

Called when we catch a signal.

If the signal is SIGINT or SIGTERM we'll set the global done variable to true

Parameters:
[in] signalNumber The signal number caught


Generated on Wed Mar 8 14:43:32 2006 for Fountain by  doxygen 1.4.6