aboutsummaryrefslogtreecommitdiff
path: root/contrib/epee/include/net/abstract_tcp_server2.h
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2018-05-31 14:54:55 -0500
committerluigi1111 <luigi1111w@gmail.com>2018-05-31 14:54:55 -0500
commit8a7b3ff13858c5d879530c99de5c723c88429342 (patch)
tree985ab3b201002a86714731fe080b3c223f930bee /contrib/epee/include/net/abstract_tcp_server2.h
parentMerge pull request #3640 (diff)
parenthttp_protocol_handler: limit the number of starting newlines (diff)
downloadmonero-8a7b3ff13858c5d879530c99de5c723c88429342.tar.xz
Merge pull request #3866
6a58c88 console_handler: fix start_default_console use of prompt parameter (moneromooo-monero) 885a117 http_protocol_handler: speedup newline discarding (moneromooo-monero) 4d15864 abstract_tcp_server2: timeout on RPC connections (moneromooo-monero) dfd36bb http_protocol_handler: limit the number of starting newlines (moneromooo-monero)
Diffstat (limited to 'contrib/epee/include/net/abstract_tcp_server2.h')
-rw-r--r--contrib/epee/include/net/abstract_tcp_server2.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/contrib/epee/include/net/abstract_tcp_server2.h b/contrib/epee/include/net/abstract_tcp_server2.h
index ccde928ba..2f7325be5 100644
--- a/contrib/epee/include/net/abstract_tcp_server2.h
+++ b/contrib/epee/include/net/abstract_tcp_server2.h
@@ -135,6 +135,11 @@ namespace net_utils
/// Handle completion of a write operation.
void handle_write(const boost::system::error_code& e, size_t cb);
+ /// reset connection timeout timer and callback
+ void reset_timer(boost::posix_time::milliseconds ms, bool add);
+ boost::posix_time::milliseconds get_default_time() const;
+ boost::posix_time::milliseconds get_timeout_from_bytes_read(size_t bytes) const;
+
/// Buffer for incoming data.
boost::array<char, 8192> buffer_;
//boost::array<char, 1024> buffer_;
@@ -158,6 +163,9 @@ namespace net_utils
boost::mutex m_throttle_speed_in_mutex;
boost::mutex m_throttle_speed_out_mutex;
+ boost::asio::deadline_timer m_timer;
+ bool m_local;
+
public:
void setRpcStation();
};