very buggy system working, but only works properly with one client at a time due to recv blocking

This commit is contained in:
Kayne Ruse
2013-05-17 19:32:45 +10:00
parent 738320e88e
commit 24e48dec53
12 changed files with 153 additions and 42 deletions
+18 -1
View File
@@ -1,5 +1,6 @@
#include "lobby.hpp"
#include <exception>
#include <iostream>
using namespace std;
@@ -8,10 +9,26 @@ using namespace std;
//Public access members
//-------------------------
Lobby::Lobby() {
Lobby::Lobby(ConfigUtility* cUtil, SurfaceManager* sMgr, TCPSocket* sock) {
#ifdef DEBUG
cout << "entering Lobby" << endl;
#endif
configUtil = cUtil;
surfaceMgr = sMgr;
socket = sock;
//ping the network, ping the preset "phone home" servers
//generate the server list
//eventually
try {
socket->Open(configUtil->CString("ip"), configUtil->Integer("port"));
}
catch(exception& e) {
cerr << "Network Error: " << e.what() << endl;
}
SetNextScene(SceneList::TESTSYSTEMS);
}
Lobby::~Lobby() {