about summary refs log tree commit diff
path: root/masterserver/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'masterserver/src/main.cpp')
-rw-r--r--masterserver/src/main.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/masterserver/src/main.cpp b/masterserver/src/main.cpp
new file mode 100644
index 00000000..380830ad
--- /dev/null
+++ b/masterserver/src/main.cpp
@@ -0,0 +1,29 @@
+#include <cstdio>
+#include <cstdlib>
+
+#include "masterserver.h"
+
+int main(int argc, char *argv[])
+{
+	if (argc != 2)
+	{
+		puts("Usage: masterserver <port>    (this will bind the server to the port specified (both udp and tcp).");
+		return -1;
+	}
+
+	int port = atoi(argv[1]);
+
+	CMasterServer masterServer;
+	masterServer.Init(port);
+
+	while (1)
+	{
+		masterServer.Tick();
+
+		thread_sleep(10);
+	}
+
+	masterServer.Shutdown();
+	
+	return 0;
+}