Project

General

Profile

Statistics
| Revision:

root / trunk / code / projects / colonet / ColonetServer / Main.cpp @ 397

History | View | Annotate | Download (686 Bytes)

1
#include <stdio.h>
2
#include <ColonetServer.h>
3

    
4
ColonetServer colonet_server;
5

    
6
/**
7
 * @brief The main function of the server
8
 *
9
 * @param argc The number of command line arguments passed to the program
10
 * @param argv The command line arguments passed to the program
11
 *
12
 * @return 0 on success, negative error code on error
13
 */
14
int main(int argc, char** argv) {
15
  if (colonet_server.initialize_server(argc, argv) < 0) {
16
    fprintf(stderr, "\nThere was an error initializing the server.\n");
17
    return -1;
18
  }
19

    
20
  if (colonet_server.start_listening() < 0) {
21
    fprintf(stderr, "ColonetServer.start_listening failed.\n");
22
    return -1;
23
  }
24

    
25
  colonet_server.run_server();
26

    
27
  return 0;
28
}