-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathPraxisServer.h
More file actions
40 lines (31 loc) · 813 Bytes
/
Copy pathPraxisServer.h
File metadata and controls
40 lines (31 loc) · 813 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#ifndef PRAXISSERVER_H
#define PRAXISSERVER_H
#ifdef __PRAXIS_WINDOWS__
#include <windows.h>
#include <mmsystem.h>
#include <winuser.h>
#include <winsock.h>
#endif
#ifdef __PRAXIS_LINUX__
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <netinet/in.h>
#include <arpa/inet.h>
typedef int SOCKET;
static int INVALID_SOCKET = -1;
static int SOCKET_ERROR = -1;
#endif
#include <string>
namespace PraxisServer
{
bool Start();
SOCKET Accept();
bool SocketIsValid(SOCKET s);
std::string Receive();
void Send(std::string & data);
void SetBlockingOption(u_long mode);
std::string Receive(SOCKET s);
void Send(SOCKET s, std::string & data);
void SetBlockingOption(SOCKET s, u_long mode);
}
#endif // PRAXISSERVER_H