Revision 655
added some more documentation
Main.cpp | ||
---|---|---|
1 |
/** |
|
2 |
* @file Main.cpp |
|
3 |
* |
|
4 |
* @author Jason Knichel |
|
5 |
* |
|
6 |
*/ |
|
1 | 7 |
#include <stdio.h> |
2 | 8 |
#include <signal.h> |
3 | 9 |
#include <ColonetServer.h> |
... | ... | |
5 | 11 |
|
6 | 12 |
ColonetServer colonet_server; |
7 | 13 |
|
14 |
//TODO: what does the parameter a do? |
|
15 |
/** |
|
16 |
* @brief This function performs any cleanup needed to be done when the program dies. |
|
17 |
* |
|
18 |
* @return Void |
|
19 |
*/ |
|
8 | 20 |
void cleanup(int a) { |
9 | 21 |
a = a; |
10 | 22 |
|
... | ... | |
28 | 40 |
return -1; |
29 | 41 |
} |
30 | 42 |
|
43 |
//register a signal handler to be called when we get a SIGINT signal (killing the server by cntrl+c would generate this) |
|
31 | 44 |
signal(SIGINT, cleanup); |
32 | 45 |
|
33 | 46 |
if (colonet_server.start_listening() < 0) { |
Also available in: Unified diff