Files
wagic/JGE/include/JNetwork.h
wagic.the.homebrew@gmail.com fd8645d1a4 Erwan
- JGE updates : main accepts argv/argc. Compilation variables for MP3 and Network support
- Minor fix in Wagic (potentially fixes crashes when using activated abilities several times in onr turn. Couldn't reproduce the issue)
2010-07-11 10:56:12 +00:00

53 lines
967 B
C++

#ifndef _JNETWORK_H_
#define _JNETWORK_H_
//Network support for PSP
//#define NETWORK_SUPPORT
#include "JGE.h"
#include <string>
using namespace std;
class JNetwork{
private:
static JNetwork * mInstance;
static int connected_to_ap;
public:
static string error;
JNetwork();
static JNetwork * GetInstance();
static void EndInstance();
static string serverIP;
int receive(char * buffer, int length);
int send(char * buffer, int length);
int connect(string serverIP = "");
static int isConnected();
#if defined (WIN32)
static int net_thread(void* param);
#elif defined (LINUX)
static void* net_thread(void* param);
#else
static int connect_to_apctl(int config);
#endif
private:
#if defined (WIN32)
static DWORD netthread;
#elif defined (LINUX)
static pthread_t netthread;
#else
static int netthread;
#endif
};
#if defined (WIN32)
#elif defined (LINUX)
#else
static int net_thread(SceSize args, void *argp);
#endif
#endif