diff options
author | Determinant <[email protected]> | 2019-04-03 14:55:26 -0400 |
---|---|---|
committer | Determinant <[email protected]> | 2019-04-03 14:55:26 -0400 |
commit | b7802b3b06511f067719cb845dfd03a223f0e18f (patch) | |
tree | 80bd89e89e073e0a51233a228a562c463f8a20d4 /src/conn.cpp | |
parent | aaa5ab0a55c0b9758e59883dcffae248c6c52564 (diff) |
improve non-blocking API
Diffstat (limited to 'src/conn.cpp')
-rw-r--r-- | src/conn.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/conn.cpp b/src/conn.cpp index 4ab3040..5fc59f3 100644 --- a/src/conn.cpp +++ b/src/conn.cpp @@ -185,6 +185,7 @@ void ConnPool::accept_client(int fd, int) { NetAddr addr((struct sockaddr_in *)&client_addr); conn_t conn = create_conn(); conn->self_ref = conn; + conn->send_buffer.set_capacity(queue_capacity); conn->seg_buff_size = seg_buff_size; conn->fd = client_fd; conn->cpool = this; @@ -264,6 +265,7 @@ ConnPool::conn_t ConnPool::_connect(const NetAddr &addr) { throw ConnPoolError(std::string("unable to set nonblocking socket")); conn_t conn = create_conn(); conn->self_ref = conn; + conn->send_buffer.set_capacity(queue_capacity); conn->seg_buff_size = seg_buff_size; conn->fd = fd; conn->cpool = this; |