summaryrefslogtreecommitdiff
path: root/node/TcpSocket.hpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2014-04-01 15:55:05 -0700
committerAdam Ierymenko <adam.ierymenko@gmail.com>2014-04-01 15:55:05 -0700
commit0e1fc06a6f3b5c7aaa06ba370f85337176ae8a85 (patch)
treea7b73495b52736d100b0dfa82b38883d118edd2c /node/TcpSocket.hpp
parentc3b41c289d891781b75819a00ec927c14842b6cd (diff)
downloadinfinitytier-0e1fc06a6f3b5c7aaa06ba370f85337176ae8a85.tar.gz
infinitytier-0e1fc06a6f3b5c7aaa06ba370f85337176ae8a85.zip
The remove paths on send fail thing in Peer.cpp was not well thought out, and there is no point in mallocing the TCP write buffer.
Diffstat (limited to 'node/TcpSocket.hpp')
-rw-r--r--node/TcpSocket.hpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/node/TcpSocket.hpp b/node/TcpSocket.hpp
index 8a9a7095..59d1ec0b 100644
--- a/node/TcpSocket.hpp
+++ b/node/TcpSocket.hpp
@@ -78,10 +78,8 @@ protected:
Socket(t,s),
_lastActivity(Utils::now()),
_sm(sm),
- _outbuf((unsigned char *)0),
- _outptr(0),
- _outbufsize(0),
_inptr(0),
+ _outptr(0),
_connecting(c),
_remote(r)
{
@@ -93,12 +91,11 @@ protected:
private:
unsigned char _inbuf[ZT_SOCKET_MAX_MESSAGE_LEN];
+ unsigned char _outbuf[ZT_SOCKET_MAX_MESSAGE_LEN * 4];
uint64_t _lastActivity; // updated whenever data is received, checked directly by SocketManager for stale TCP cleanup
SocketManager *_sm;
- unsigned char *_outbuf;
- unsigned int _outptr;
- unsigned int _outbufsize;
unsigned int _inptr;
+ unsigned int _outptr;
bool _connecting; // manipulated directly by SocketManager, true if connect() is in progress
InetAddress _remote;
Mutex _writeLock;