aboutsummaryrefslogtreecommitdiff
path: root/socket.h
blob: ccdb60ca7256d22ff0c7bacaf0495bc34a51f4c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#ifndef __SOCKET_H
#define __SOCKET_H

#ifdef _WIN32
	#include <io.h>
	#include <winsock.h>
#else
	#include <sys/socket.h>
	#include <netinet/in.h>
	#include <netinet/tcp.h>
	#include <arpa/inet.h>
	#include <netdb.h>
	#include <unistd.h>

	#define closesocket close
	#define SOCKET int
	#define INVALID_SOCKET -1
	#define SOCKET_ERROR -1
#endif

#endif