diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/salticidae/conn.h | 15 | ||||
-rw-r--r-- | include/salticidae/network.h | 19 |
2 files changed, 17 insertions, 17 deletions
diff --git a/include/salticidae/conn.h b/include/salticidae/conn.h index 4e2f0f9..9afc813 100644 --- a/include/salticidae/conn.h +++ b/include/salticidae/conn.h @@ -359,12 +359,9 @@ class ConnPool { class Config { friend class ConnPool; - template<typename OpcodeType> friend class MsgNetwork; int _max_listen_backlog; double _conn_server_timeout; size_t _seg_buff_size; - size_t _max_msg_size; - size_t _max_msg_queue_size; size_t _max_recv_buff_size; size_t _nworker; size_t _queue_capacity; @@ -381,8 +378,6 @@ class ConnPool { _max_listen_backlog(10), _conn_server_timeout(2), _seg_buff_size(4096), - _max_msg_size(1024), - _max_msg_queue_size(65536), _max_recv_buff_size(4096), _nworker(1), _queue_capacity(0), @@ -409,16 +404,6 @@ class ConnPool { return *this; } - Config &max_msg_size(size_t x) { - _max_msg_size = x; - return *this; - } - - Config &max_msg_queue_size(size_t x) { - _max_msg_queue_size = x; - return *this; - } - Config &max_recv_buff_size(size_t x) { _max_recv_buff_size = x; return *this; diff --git a/include/salticidae/network.h b/include/salticidae/network.h index 18f3a42..3ecffe7 100644 --- a/include/salticidae/network.h +++ b/include/salticidae/network.h @@ -155,13 +155,28 @@ class MsgNetwork: public ConnPool { public: class Config: public ConnPool::Config { - friend MsgNetwork; + friend class MsgNetwork; + size_t _max_msg_size; + size_t _max_msg_queue_size; size_t _burst_size; public: Config(): Config(ConnPool::Config()) {} Config(const ConnPool::Config &config): - ConnPool::Config(config), _burst_size(1000) {} + ConnPool::Config(config), + _max_msg_size(1024), + _max_msg_queue_size(65536), + _burst_size(1000) {} + + Config &max_msg_size(size_t x) { + _max_msg_size = x; + return *this; + } + + Config &max_msg_queue_size(size_t x) { + _max_msg_queue_size = x; + return *this; + } Config &burst_size(size_t x) { _burst_size = x; |