summaryrefslogtreecommitdiffstats
path: root/src/Net/Connection.h
diff options
context:
space:
mode:
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);