Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultServerConfig = serverConfig{ ReadHeaderTimeout: 5 * time.Second, ReadTimeout: 30 * time.Second, WriteTimeout: 30 * time.Second, IdleTimeout: 120 * time.Second, }
DefaultServerConfig is the default server config
Functions ¶
func LimitListener ¶
LimitListener creates a tcp keep-alive listener with 400 maximum connections.
Types ¶
type ServerOption ¶ added in v1.8.4
type ServerOption func(*serverConfig)
ServerOption is a server option
func ReadHeaderTimeout ¶ added in v1.8.4
func ReadHeaderTimeout(h time.Duration) ServerOption
ReadHeaderTimeout sets header timeout
Click to show internal directories.
Click to hide internal directories.