diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2008-03-09 12:24:01 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2008-03-09 12:24:01 +0000 |
| commit | 032c7c28083e17bdcfd763b3cf81447b06a07978 (patch) | |
| tree | e5cc5ceb050773165df41eb7f0aed3f2a48205a0 /src/BtHandshakeMessage.h | |
| parent | ca3f6e57f35c67f67c3b4f64cedded8ca23237e8 (diff) | |
2008-03-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
type cleanup for allmost all remaining files.
Diffstat (limited to 'src/BtHandshakeMessage.h')
| -rw-r--r-- | src/BtHandshakeMessage.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/BtHandshakeMessage.h b/src/BtHandshakeMessage.h index f01d9407..91447253 100644 --- a/src/BtHandshakeMessage.h +++ b/src/BtHandshakeMessage.h @@ -41,12 +41,12 @@ namespace aria2 { class BtHandshakeMessage : public SimpleBtMessage { public: - static const int32_t PSTR_LENGTH = 19; + static const size_t PSTR_LENGTH = 19; static const unsigned char* BT_PSTR; - static const int32_t RESERVED_LENGTH = 8; - static const int32_t MESSAGE_LENGTH = 68; + static const size_t RESERVED_LENGTH = 8; + static const size_t MESSAGE_LENGTH = 68; private: - int8_t pstrlen; + uint8_t pstrlen; unsigned char* pstr; unsigned char* reserved; unsigned char* infoHash; @@ -62,7 +62,7 @@ public: BtHandshakeMessage(const unsigned char* infoHash, const unsigned char* peerId); static SharedHandle<BtHandshakeMessage> - create(const unsigned char* data, int32_t dataLength); + create(const unsigned char* data, size_t dataLength); virtual ~BtHandshakeMessage() { delete [] msg; @@ -72,15 +72,15 @@ public: delete [] peerId; } - static const int8_t ID = INT8_MAX; + static const uint8_t ID = INT8_MAX; - virtual int8_t getId() { return ID; } + virtual uint8_t getId() { return ID; } virtual void doReceivedAction() {}; virtual const unsigned char* getMessage(); - virtual int32_t getMessageLength(); + virtual size_t getMessageLength(); virtual std::string toString() const; @@ -99,7 +99,7 @@ public: } } - int8_t getPstrlen() const { + uint8_t getPstrlen() const { return pstrlen; } |
