summaryrefslogtreecommitdiff
path: root/src/PeerConnection.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/PeerConnection.h')
-rw-r--r--src/PeerConnection.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/PeerConnection.h b/src/PeerConnection.h
index d543d4e8..f8b94b0c 100644
--- a/src/PeerConnection.h
+++ b/src/PeerConnection.h
@@ -37,6 +37,7 @@
#include "common.h"
#include "SharedHandle.h"
+#include "SocketBuffer.h"
#include <unistd.h>
namespace aria2 {
@@ -64,6 +65,8 @@ private:
unsigned char lenbuf[4];
size_t lenbufLength;
+ SocketBuffer _socketBuffer;
+
bool _encryptionEnabled;
SharedHandle<ARC4Encryptor> _encryptor;
SharedHandle<ARC4Decryptor> _decryptor;
@@ -72,7 +75,7 @@ private:
void readData(unsigned char* data, size_t& length, bool encryption);
- void sendData(const unsigned char* data, size_t length, bool encryption);
+ ssize_t sendData(const unsigned char* data, size_t length, bool encryption);
public:
PeerConnection(int32_t cuid, const SharedHandle<SocketCore>& socket, const Option* op);