Files
wagic/JGE/include/JNetwork.h
wagic.the.homebrew@gmail.com f32f5f3793 Erwan
- Crude networking functions:
+ Basic message works on Windows
+ Compiles on PSP but doesn't work yet
+ Nothing done for Linux -> TODO!
2009-05-18 11:22:53 +00:00

43 lines
844 B
C++

#ifndef _JNETWORK_H_
#define _JNETWORK_H_
#ifdef WIN32
#elif defined (LINUX)
#else
#endif
#include "JGE.h"
#include <string>
using namespace std;
class JNetwork{
private:
static JNetwork * mInstance;
static int connected_to_ap;
public:
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) || defined (LINUX)
static int net_thread(LPVOID param);
#else
static int net_thread(SceSize args, void *argp);
static int connect_to_apctl(int config);
#endif
private:
#if defined (WIN32) || defined (LINUX)
static DWORD netthread;
#else
static int netthread;
#endif
};
#endif