mirror of
https://github.com/caddyserver/caddy.git
synced 2026-06-06 14:05:19 -04:00
core: Refactor listeners; use SO_REUSEPORT on Unix (#4705)
* core: Refactor listeners; use SO_REUSEPORT on Unix
Just an experiment for now
* Fix lint by logging error
* TCP Keepalive configuration (#4865)
* initial attempt at TCP Keepalive configuration
* core: implement tcp-keepalive for linux
* move canSetKeepAlive interface
* Godoc for keepalive server parameter
* handle return values
* log keepalive errors
* Clean up after bad merge
* Merge in pluggable network types
From 1edc1a45e3
* Slight refactor, fix from recent merge conflict
Co-authored-by: Karmanyaah Malhotra <karmanyaah.gh@malhotra.cc>
This commit is contained in:
@@ -72,6 +72,11 @@ type Server struct {
|
||||
// 5m is applied to help avoid resource exhaustion.
|
||||
IdleTimeout caddy.Duration `json:"idle_timeout,omitempty"`
|
||||
|
||||
// KeepAliveInterval is the interval at which TCP keepalive packets
|
||||
// are sent to keep the connection alive at the TCP layer when no other
|
||||
// data is being transmitted. The default is 15s.
|
||||
KeepAliveInterval caddy.Duration `json:"keepalive_interval,omitempty"`
|
||||
|
||||
// MaxHeaderBytes is the maximum size to parse from a client's
|
||||
// HTTP request headers.
|
||||
MaxHeaderBytes int `json:"max_header_bytes,omitempty"`
|
||||
|
||||
Reference in New Issue
Block a user