Skip to content

Commit

Permalink
Disable Nagles Algorithm inside UvFifo (client) and UvFifoListener (s…
Browse files Browse the repository at this point in the history
…erver) yeeting small packets
  • Loading branch information
caldog20 committed Dec 3, 2022
1 parent 927adc9 commit 69b52b6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/support/uvfile.cc
Original file line number Diff line number Diff line change
Expand Up @@ -701,6 +701,7 @@ PCSX::UvFifo::UvFifo(const std::string_view address, unsigned port) : File(File:
m_tcp = tcp;
request([this, host = std::string(address), port](auto loop) {
uv_tcp_init(loop, m_tcp);
uv_tcp_nodelay(m_tcp, 1);
struct sockaddr_in connectAddr;
int result = uv_ip4_addr(host.c_str(), port, &connectAddr);
if (result != 0) {
Expand Down Expand Up @@ -851,6 +852,7 @@ void PCSX::UvFifoListener::start(unsigned port, uv_loop_t *loop, uv_async_t *asy
});
request([this, port](auto loop) {
uv_tcp_init(loop, &m_server);
uv_tcp_nodelay(&m_server, 1);
m_server.data = this;

struct sockaddr_in bindAddr;
Expand Down

0 comments on commit 69b52b6

Please sign in to comment.