aboutsummaryrefslogtreecommitdiff
path: root/contrib/epee/include/net/levin_protocol_handler_async.h
diff options
context:
space:
mode:
authorrfree2monero <rfreemonero@op.pl>2015-01-05 20:30:17 +0100
committerrfree2monero <rfreemonero@op.pl>2015-02-20 22:13:00 +0100
commiteabb519605cab00dbaa5a1868d229f09c74570a6 (patch)
tree42f909d8e94e8cf67836d57cef4053ac572e3f8c /contrib/epee/include/net/levin_protocol_handler_async.h
parentMerge pull request #229 (diff)
downloadmonero-eabb519605cab00dbaa5a1868d229f09c74570a6.tar.xz
2014 network limit 1.0a +utils +toc -doc -drmonero
commands and options for network limiting works very well e.g. for 50 KiB/sec up and down ToS (QoS) flag peer number limit TODO some spikes in ingress/download TODO problems when other up and down limit added "otshell utils" - simple logging (with colors, text files channels)
Diffstat (limited to 'contrib/epee/include/net/levin_protocol_handler_async.h')
-rw-r--r--contrib/epee/include/net/levin_protocol_handler_async.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/contrib/epee/include/net/levin_protocol_handler_async.h b/contrib/epee/include/net/levin_protocol_handler_async.h
index e79768b04..5e5e803f5 100644
--- a/contrib/epee/include/net/levin_protocol_handler_async.h
+++ b/contrib/epee/include/net/levin_protocol_handler_async.h
@@ -81,6 +81,7 @@ public:
async_protocol_handler_config():m_pcommands_handler(NULL), m_max_packet_size(LEVIN_DEFAULT_MAX_PACKET_SIZE)
{}
+ void del_connections(size_t count);
};
@@ -669,6 +670,14 @@ void async_protocol_handler_config<t_connection_context>::del_connection(async_p
}
//------------------------------------------------------------------------------------------
template<class t_connection_context>
+void async_protocol_handler_config<t_connection_context>::del_connections(size_t count) // TODO
+{
+ CRITICAL_REGION_BEGIN(m_connects_lock);
+ m_connects.clear();
+ CRITICAL_REGION_END();
+}
+//------------------------------------------------------------------------------------------
+template<class t_connection_context>
void async_protocol_handler_config<t_connection_context>::add_connection(async_protocol_handler<t_connection_context>* pconn)
{
CRITICAL_REGION_BEGIN(m_connects_lock);