Imported the rsc directory from prototype-1

This commit is contained in:
Kayne Ruse
2013-06-12 05:23:06 +10:00
parent dfe0b4985a
commit 37a9e4268b
10 changed files with 30 additions and 4 deletions
+10 -2
View File
@@ -23,8 +23,16 @@ void ServerApplication::Init() {
}
configUtil.Load("rsc/config.cfg");
netUtil.Open(configUtil.Int("serverport"), sizeof(Packet));
running = true;
//check the port is valid
if (configUtil.Int("server.port") <= 0) {
throw(runtime_error("Cannot open the server on an invalid port or port 0"));
}
cout << "Opening on port " << configUtil["server.port"] << endl;
netUtil.Open(configUtil.Int("server.port"), sizeof(Packet));
//disabled for debugging
// running = true;
}
void ServerApplication::Proc() {