Functions | Variables

src/Detector.cpp File Reference

#include <iostream>
#include <csignal>
#include <cstdlib>
#include "server.h"

Go to the source code of this file.

Functions

void terminate (int signum)
int main ()

Variables

ServertheServer
int serverPort = 4444

Function Documentation

int main (  ) 

Implements signal SIGTERM and SIGINT, enabling the server to stop on these. Instantiates the Server and calls start using the port defined using serverPort.

Todo:
Add parameters to detector and operating system wrappers, allowing control of starting and stopping as well as parameters for socket timeout, server listen port numbers, maximum number of concurrent clients.

Definition at line 62 of file Detector.cpp.

References serverPort, Server::start(), terminate(), and theServer.

void terminate ( int  signum  ) 

Echoes the terminate signal number and stops the server.

Parameters:
signum the signal number sent from the system.

Definition at line 50 of file Detector.cpp.

References Server::stop(), and theServer.

Referenced by main().


Variable Documentation

int serverPort = 4444

Defines which port the server should use.

Definition at line 45 of file Detector.cpp.

Referenced by main().

Definition at line 41 of file Detector.cpp.

Referenced by main(), and terminate().

 All Classes Namespaces Files Functions Variables