From 853a6503391a05a3f60b50bb40a7dd4f35588293 Mon Sep 17 00:00:00 2001 From: Determinant Date: Fri, 14 Feb 2020 15:13:47 -0500 Subject: change queue_capacity to max_send_buff_size; adjust the C API --- src/conn.cpp | 4 ++-- src/network.cpp | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/conn.cpp b/src/conn.cpp index 311b1f8..ba584c1 100644 --- a/src/conn.cpp +++ b/src/conn.cpp @@ -319,7 +319,7 @@ void ConnPool::accept_client(int fd, int) { NetAddr addr((struct sockaddr_in *)&client_addr); conn_t conn = create_conn(); - conn->send_buffer.set_capacity(queue_capacity); + conn->send_buffer.set_capacity(max_send_buff_size); conn->seg_buff_size = seg_buff_size; conn->max_recv_buff_size = max_recv_buff_size; conn->fd = client_fd; @@ -400,7 +400,7 @@ ConnPool::conn_t ConnPool::_connect(const NetAddr &addr) { if (fcntl(fd, F_SETFL, O_NONBLOCK) == -1) throw ConnPoolError(SALTI_ERROR_CONNECT, errno); conn_t conn = create_conn(); - conn->send_buffer.set_capacity(queue_capacity); + conn->send_buffer.set_capacity(max_send_buff_size); conn->seg_buff_size = seg_buff_size; conn->max_recv_buff_size = max_recv_buff_size; conn->fd = fd; diff --git a/src/network.cpp b/src/network.cpp index 2e98439..4717953 100644 --- a/src/network.cpp +++ b/src/network.cpp @@ -43,8 +43,12 @@ void msgnetwork_config_nworker(msgnetwork_config_t *self, size_t nworker) { self->nworker(nworker); } -void msgnetwork_config_queue_capacity(msgnetwork_config_t *self, size_t cap) { - self->queue_capacity(cap); +void msgnetwork_config_max_recv_buff_size(msgnetwork_config_t *self, size_t size) { + self->max_recv_buff_size(size); +} + +void msgnetwork_config_max_send_buff_size(msgnetwork_config_t *self, size_t size) { + self->max_send_buff_size(size); } void msgnetwork_config_enable_tls(msgnetwork_config_t *self, bool enabled) { -- cgit v1.2.3-70-g09d2