From c4c91c7cbc6c413e59f05be88e6bd1c6bc83679d Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Wed, 10 Sep 2008 21:46:33 +0200 Subject: Server-Status-Abfrage zeigt jetzt uptime an --- src/Net/Connection.h | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'src/Net/Connection.h') diff --git a/src/Net/Connection.h b/src/Net/Connection.h index d733ee3..0f012f1 100644 --- a/src/Net/Connection.h +++ b/src/Net/Connection.h @@ -38,7 +38,7 @@ class Connection { unsigned long length; unsigned long transmitted; - unsigned char *data; + uint8_t *data; sigc::slot notify; }; @@ -87,15 +87,15 @@ class Connection { protected: struct ConnectionHeader { - unsigned char m; - unsigned char a; - unsigned char d; - unsigned char type; - - unsigned char versionMajor; - unsigned char versionMinor; - unsigned char protVerMin; - unsigned char protVerMax; + uint8_t m; + uint8_t a; + uint8_t d; + uint8_t type; + + uint8_t versionMajor; + uint8_t versionMinor; + uint8_t protVerMin; + uint8_t protVerMax; }; int sock; @@ -116,7 +116,7 @@ class Connection { virtual void connectionHeader() = 0; bool rawReceive(unsigned long length, const sigc::slot ¬ify); - bool rawSend(const unsigned char *data, unsigned long length); + bool rawSend(const uint8_t *data, unsigned long length); bool enterReceiveLoop() { if(!isConnected() || isDisconnecting()) @@ -189,7 +189,7 @@ class Connection { if(!isConnected() || isConnecting() || isDisconnecting()) return false; - return rawSend(reinterpret_cast(packet.getRawData()), packet.getRawDataLength()); + return rawSend((const uint8_t*)packet.getRawData(), packet.getRawDataLength()); } void sendReceive(short events = POLLIN|POLLOUT); -- cgit v1.2.3