summaryrefslogtreecommitdiffstats
path: root/src/Net/Connection.h
diff options
context:
space:
mode:
authorMatthias Schiffer <matthias@gamezock.de>2008-09-10 21:46:33 +0200
committerMatthias Schiffer <matthias@gamezock.de>2008-09-10 21:46:33 +0200
commitc4c91c7cbc6c413e59f05be88e6bd1c6bc83679d (patch)
treecd6148bbf037eb323bbfe6bd40a697ea0bbd2d17 /src/Net/Connection.h
parent55a6045504bee4bf425870b6b427abd5240e7303 (diff)
downloadmad-c4c91c7cbc6c413e59f05be88e6bd1c6bc83679d.tar
mad-c4c91c7cbc6c413e59f05be88e6bd1c6bc83679d.zip
Server-Status-Abfrage zeigt jetzt uptime an
Diffstat (limited to 'src/Net/Connection.h')
-rw-r--r--src/Net/Connection.h24
1 files changed, 12 insertions, 12 deletions
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<void,const void*,unsigned long> 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<void,const void*,unsigned long> &notify);
- 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<const unsigned char*>(packet.getRawData()), packet.getRawDataLength());
+ return rawSend((const uint8_t*)packet.getRawData(), packet.getRawDataLength());
}
void sendReceive(short events = POLLIN|POLLOUT);