399
|
1 |
#ifndef NETWORK_PLATFORM_H
|
|
2 |
#define NETWORK_PLATFORM_H
|
|
3 |
|
|
4 |
/**
|
|
5 |
* @file
|
|
6 |
*
|
|
7 |
* Takes care of platform-specific imports and #defines as regards the Network code
|
|
8 |
*/
|
|
9 |
|
|
10 |
#ifndef WIN32
|
|
11 |
// NetworkAddress
|
|
12 |
#include <netinet/in.h>
|
|
13 |
|
|
14 |
// NetworkEndpoint
|
|
15 |
#include <sys/types.h>
|
|
16 |
#include <netdb.h>
|
|
17 |
|
|
18 |
// NetworkSocket
|
|
19 |
#include <sys/types.h>
|
|
20 |
#include <sys/socket.h>
|
|
21 |
#include <unistd.h>
|
|
22 |
#include <fcntl.h>
|
|
23 |
#define closesocket close
|
|
24 |
|
|
25 |
#else
|
|
26 |
#error "This network code won't compile on win32 :)"
|
|
27 |
#endif
|
|
28 |
|
|
29 |
|
|
30 |
#endif
|