author | Tero Marttila <terom@fixme.fi> |
Fri, 16 Jan 2009 22:03:49 +0200 | |
changeset 400 | d64bf28c4340 |
parent 399 | src/Network/Platform.h@c7295b72731a |
child 423 | 947ab54de4b7 |
permissions | -rw-r--r-- |
400
d64bf28c4340
more documentation tweaking, all Network/ files now have a @file comment. Fix Platform.h -> Platform.hh, and Buffer.hh + Packet.cc
Tero Marttila <terom@fixme.fi>
parents:
399
diff
changeset
|
1 |
#ifndef NETWORK_PLATFORM_HH |
d64bf28c4340
more documentation tweaking, all Network/ files now have a @file comment. Fix Platform.h -> Platform.hh, and Buffer.hh + Packet.cc
Tero Marttila <terom@fixme.fi>
parents:
399
diff
changeset
|
2 |
#define NETWORK_PLATFORM_HH |
399 | 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 |
|
400
d64bf28c4340
more documentation tweaking, all Network/ files now have a @file comment. Fix Platform.h -> Platform.hh, and Buffer.hh + Packet.cc
Tero Marttila <terom@fixme.fi>
parents:
399
diff
changeset
|
24 |
|
d64bf28c4340
more documentation tweaking, all Network/ files now have a @file comment. Fix Platform.h -> Platform.hh, and Buffer.hh + Packet.cc
Tero Marttila <terom@fixme.fi>
parents:
399
diff
changeset
|
25 |
// NetworkReactor |
d64bf28c4340
more documentation tweaking, all Network/ files now have a @file comment. Fix Platform.h -> Platform.hh, and Buffer.hh + Packet.cc
Tero Marttila <terom@fixme.fi>
parents:
399
diff
changeset
|
26 |
#include <sys/select.h> |
d64bf28c4340
more documentation tweaking, all Network/ files now have a @file comment. Fix Platform.h -> Platform.hh, and Buffer.hh + Packet.cc
Tero Marttila <terom@fixme.fi>
parents:
399
diff
changeset
|
27 |
#include <errno.h> |
399 | 28 |
|
400
d64bf28c4340
more documentation tweaking, all Network/ files now have a @file comment. Fix Platform.h -> Platform.hh, and Buffer.hh + Packet.cc
Tero Marttila <terom@fixme.fi>
parents:
399
diff
changeset
|
29 |
// misc, here because ClanLib included these... |
d64bf28c4340
more documentation tweaking, all Network/ files now have a @file comment. Fix Platform.h -> Platform.hh, and Buffer.hh + Packet.cc
Tero Marttila <terom@fixme.fi>
parents:
399
diff
changeset
|
30 |
#include <arpa/inet.h> |
d64bf28c4340
more documentation tweaking, all Network/ files now have a @file comment. Fix Platform.h -> Platform.hh, and Buffer.hh + Packet.cc
Tero Marttila <terom@fixme.fi>
parents:
399
diff
changeset
|
31 |
#include <sys/time.h> |
d64bf28c4340
more documentation tweaking, all Network/ files now have a @file comment. Fix Platform.h -> Platform.hh, and Buffer.hh + Packet.cc
Tero Marttila <terom@fixme.fi>
parents:
399
diff
changeset
|
32 |
#include <unistd.h> |
399 | 33 |
#else |
400
d64bf28c4340
more documentation tweaking, all Network/ files now have a @file comment. Fix Platform.h -> Platform.hh, and Buffer.hh + Packet.cc
Tero Marttila <terom@fixme.fi>
parents:
399
diff
changeset
|
34 |
// misc, here because ClanLib included these... |
d64bf28c4340
more documentation tweaking, all Network/ files now have a @file comment. Fix Platform.h -> Platform.hh, and Buffer.hh + Packet.cc
Tero Marttila <terom@fixme.fi>
parents:
399
diff
changeset
|
35 |
#include <winsock2.h> |
d64bf28c4340
more documentation tweaking, all Network/ files now have a @file comment. Fix Platform.h -> Platform.hh, and Buffer.hh + Packet.cc
Tero Marttila <terom@fixme.fi>
parents:
399
diff
changeset
|
36 |
#include <windows.h> |
d64bf28c4340
more documentation tweaking, all Network/ files now have a @file comment. Fix Platform.h -> Platform.hh, and Buffer.hh + Packet.cc
Tero Marttila <terom@fixme.fi>
parents:
399
diff
changeset
|
37 |
typedef int socklen_t; |
d64bf28c4340
more documentation tweaking, all Network/ files now have a @file comment. Fix Platform.h -> Platform.hh, and Buffer.hh + Packet.cc
Tero Marttila <terom@fixme.fi>
parents:
399
diff
changeset
|
38 |
|
399 | 39 |
#error "This network code won't compile on win32 :)" |
40 |
#endif |
|
41 |
||
42 |
||
43 |
#endif |