Cleaned up Network code (hope that fixes the PSP compilation problems)

Added random seed logging
This commit is contained in:
Xawotihs@gmail.com
2013-01-25 21:47:16 +00:00
parent 4bf419fbaf
commit 2ba5eb0022
10 changed files with 39 additions and 56 deletions

View File

@@ -17,6 +17,8 @@ typedef void(*processCmd)(void*, stringstream&, stringstream&);
class JNetwork {
private:
private:
boost::thread *mpWorkerThread;
struct CommandStruc{
void* object;
string command;
@@ -31,13 +33,10 @@ private:
stringstream received;
stringstream toSend;
static map<string, CommandStruc> sCommandMap;
static JNetwork* mInstance;
public:
JNetwork();
~JNetwork();
static JNetwork* GetInstance();
static void Destroy();
void Update();
int connect(string serverIP = "");
@@ -49,9 +48,6 @@ public:
#endif
bool sendCommand(const string& command, const string& payload = "", const string& suffix = "Request");
static void registerCommand(string command, void* object, processCmd processRequest, processCmd processResponse);
private:
boost::thread *mpWorkerThread;
};
#endif