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/PeerConnection.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/PeerConnection.h')
| -rw-r--r-- | src/PeerConnection.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/PeerConnection.h b/src/PeerConnection.h index 346a2e8e..664291f4 100644 --- a/src/PeerConnection.h +++ b/src/PeerConnection.h @@ -58,16 +58,16 @@ private: const Logger* logger; unsigned char resbuf[MAX_PAYLOAD_LEN]; - int32_t resbufLength; - int32_t currentPayloadLength; + size_t resbufLength; + size_t currentPayloadLength; unsigned char lenbuf[4]; - int32_t lenbufLength; + size_t lenbufLength; bool _encryptionEnabled; SharedHandle<ARC4Encryptor> _encryptor; SharedHandle<ARC4Decryptor> _decryptor; - void readData(unsigned char* data, int32_t& length, bool encryption); + void readData(unsigned char* data, size_t& length, bool encryption); void sendData(const unsigned char* data, size_t length, bool encryption); @@ -77,9 +77,9 @@ public: ~PeerConnection(); // Returns the number of bytes written - int32_t sendMessage(const unsigned char* data, int32_t dataLength); + ssize_t sendMessage(const unsigned char* data, size_t dataLength); - bool receiveMessage(unsigned char* data, int32_t& dataLength); + bool receiveMessage(unsigned char* data, size_t& dataLength); /** * Returns true if a handshake message is fully received, otherwise returns @@ -87,7 +87,7 @@ public: * In both cases, 'msg' is filled with received bytes and the filled length * is assigned to 'length'. */ - bool receiveHandshake(unsigned char* data, int32_t& dataLength, bool peek = false); + bool receiveHandshake(unsigned char* data, size_t& dataLength, bool peek = false); void enableEncryption(const SharedHandle<ARC4Encryptor>& encryptor, const SharedHandle<ARC4Decryptor>& decryptor); |
