Receive larger buffers for TCP socket

This commit is contained in:
Patrick Nicolas
2024-08-31 14:34:36 +02:00
parent 0aa5284165
commit ca1f478299
4 changed files with 71 additions and 19 deletions
+5
View File
@@ -87,6 +87,11 @@ public:
fds[1].events = POLLIN;
fds[1].fd = control.get_fd();
while (auto packet = stream.receive_pending())
std::visit(std::forward<T>(visitor), std::move(*packet));
while (auto packet = control.receive_pending())
std::visit(std::forward<T>(visitor), std::move(*packet));
int r = ::poll(fds, std::size(fds), timeout);
if (r < 0)
throw std::system_error(errno, std::system_category());