aboutsummaryrefslogtreecommitdiff
path: root/src/disgrace.c
blob: 2e7c235ce9593c55a30fa430a067296722ab1ee9 (plain)
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
#include "disgrace.h" 

enum {
    D_TYPE_TCP,
    D_TYPE_UDP
};

enum {
    D_SUBTYPE_CLIENT,
    D_SUBTYPE_SERVER,
};

#if defined(OS_WINDOWS)

#include <winsock2.h>
#include <ws2tcpip.h>
#include <windows.h>

#if defined(MSVC_COMPILER)
#pragma comment(lib, "Ws2_32.lib")
#endif

#include "d_win.c"

#elif defined(OS_LINUX)

#include <sys/types.h> 
#include <sys/socket.h> 
#include <netdb.h> 
#include <netinet/in.h> 
#include <arpa/inet.h> 

#include "d_linux.c"
#else

#error "unknown platform"
#endif