add a server main.cc

This commit is contained in:
josh committed 2012-08-15 22:36:55 -04:00
1 parent 4bb7a8dab7
commit f1c3d2c95b
2 files changed
+36 -2

No files matched your search

+35
View File
@@ -0,0 +1,35 @@
#include <getopt.h>
#include <stdlib.h>
int main(int argc, char *argv[])
{
int port = 59243;
for (;;)
{
static struct option long_options[] = {
{"port", required_argument, 0, 'p'},
{NULL, 0, 0, 0}
};
int opt_index = 0;
int c = getopt_long(argc, argv, "p:",
long_options, &opt_index);
if (c == -1)
break;
switch (c)
{
case 'p':
port = atoi(optarg);
break;
}
}
/* TODO: make this work... */
#if 0
Server server(port);
server.run();
#endif
return 0;
}