# HG changeset patch # User Kim Alvefur # Date 1536865795 -7200 # Node ID 9b0604fe01f13679752389c45935ef9c9e676278 # Parent 2d2d4c293efaf881e1a1f44fa0fb7c7c6a4e8d59 net.server_epoll: Make read_size a server-wide option Can still be overriden per connection diff -r 2d2d4c293efa -r 9b0604fe01f1 net/server_epoll.lua --- a/net/server_epoll.lua Thu Sep 13 21:07:44 2018 +0200 +++ b/net/server_epoll.lua Thu Sep 13 21:09:55 2018 +0200 @@ -37,6 +37,7 @@ tcp_backlog = 128; accept_retry_interval = 10; read_retry_delay = 1e-06; + read_size = 8192; connect_timeout = 20; handshake_timeout = 60; max_wait = 86400; @@ -306,7 +307,7 @@ -- Called when socket is readable function interface:onreadable() - local data, err, partial = self.conn:receive(self.read_size); + local data, err, partial = self.conn:receive(self.read_size or cfg.read_size); if data then self:onconnect(); self:on("incoming", data);