diff options
author | Björn Steinbrink <B.Steinbrink@gmx.de> | 2005-09-14 12:35:45 +0000 |
---|---|---|
committer | Björn Steinbrink <B.Steinbrink@gmx.de> | 2005-09-14 12:35:45 +0000 |
commit | 760d4498bd6a7a079cbff9b79d4dfcdde2e4665e (patch) | |
tree | 3349a48f5b1265acf24f35769f170467e2ca2344 /src/net | |
parent | a8c805e28016af5e6d20228e80a1d4a2f6c02c67 (diff) | |
download | mana-client-760d4498bd6a7a079cbff9b79d4dfcdde2e4665e.tar.gz mana-client-760d4498bd6a7a079cbff9b79d4dfcdde2e4665e.tar.bz2 mana-client-760d4498bd6a7a079cbff9b79d4dfcdde2e4665e.tar.xz mana-client-760d4498bd6a7a079cbff9b79d4dfcdde2e4665e.zip |
Header cleanups.
Diffstat (limited to 'src/net')
-rw-r--r-- | src/net/messageout.cpp | 3 | ||||
-rw-r--r-- | src/net/messageout.h | 4 | ||||
-rw-r--r-- | src/net/network.cpp | 16 | ||||
-rw-r--r-- | src/net/network.h | 6 | ||||
-rw-r--r-- | src/net/packet.cpp | 4 | ||||
-rw-r--r-- | src/net/protocol.cpp | 1 |
6 files changed, 16 insertions, 18 deletions
diff --git a/src/net/messageout.cpp b/src/net/messageout.cpp index 871ba43a..272cac4e 100644 --- a/src/net/messageout.cpp +++ b/src/net/messageout.cpp @@ -23,10 +23,11 @@ #include "messageout.h" -#include <iostream> +#include <string> #include <SDL_net.h> #include "network.h" +#include "packet.h" MessageOut::MessageOut(): mPacket(0), diff --git a/src/net/messageout.h b/src/net/messageout.h index d836b43f..7cbca165 100644 --- a/src/net/messageout.h +++ b/src/net/messageout.h @@ -24,9 +24,9 @@ #ifndef _TMW_MESSAGEOUT_ #define _TMW_MESSAGEOUT_ -#include <string> +#include <iosfwd> -#include "packet.h" +class Packet; /** * Used for building an outgoing message. diff --git a/src/net/network.cpp b/src/net/network.cpp index 6624ee1e..3b1d6569 100644 --- a/src/net/network.cpp +++ b/src/net/network.cpp @@ -21,18 +21,18 @@ * $Id$ */ -#include "../log.h" #include "network.h" -#include "protocol.h" + +#include <cassert> +#include <sstream> +#include <SDL_net.h> + +#include "messagein.h" + +#include "../log.h" #ifdef MACOSX #include "win2mac.h" #endif -#ifndef WIN32 -#include <unistd.h> -#include <fcntl.h> -#include <errno.h> -#endif -#include <sstream> /** Warning: buffers and other variables are shared, so there can be only one connection active at a time */ diff --git a/src/net/network.h b/src/net/network.h index a037c6fa..b6c4a520 100644 --- a/src/net/network.h +++ b/src/net/network.h @@ -24,11 +24,7 @@ #ifndef _TMW_NETWORK_ #define _TMW_NETWORK_ -#include <string> - -#include "SDL_net.h" -#include "messagein.h" -#include "messageout.h" +class MessageIn; /** Convert an address from int format to string */ char *iptostring(int address); diff --git a/src/net/packet.cpp b/src/net/packet.cpp index b8ee1e7f..6d7b2b3e 100644 --- a/src/net/packet.cpp +++ b/src/net/packet.cpp @@ -22,8 +22,8 @@ */ #include "packet.h" -#include <string.h> -#include <cstdlib> + +#include <cstring> Packet::Packet(const char *data, int length): length(length) diff --git a/src/net/protocol.cpp b/src/net/protocol.cpp index 17076b90..5a1ed9c5 100644 --- a/src/net/protocol.cpp +++ b/src/net/protocol.cpp @@ -23,6 +23,7 @@ #include "protocol.h" +#include "messagein.h" #include "network.h" #include "../being.h" |