diff --git a/server.go b/server.go index 14f1f39..45a0649 100644 --- a/server.go +++ b/server.go @@ -1,7 +1,12 @@ package config +import "time" + type Server struct { - Network string `json:"network" yaml:"network" toml:"network"` - Addr string `json:"addr" yaml:"addr" toml:"addr"` - TLS bool `json:"tls" yaml:"tls" toml:"tls"` + Name string `json:"name" yaml:"name" toml:"name"` + Network string `json:"network" yaml:"network" toml:"network"` + Addr string `json:"addr" yaml:"addr" toml:"addr"` + TLS bool `json:"tls" yaml:"tls" toml:"tls"` + Concurrency int `json:"concurrency" yaml:"concurrency" toml:"concurrency"` + MaxStopWaitTime time.Duration `json:"maxStopWaitTime" yaml:"maxStopWaitTime" toml:"maxStopWaitTime"` } diff --git a/websocket.go b/websocket.go index 42a187c..6d59cb8 100644 --- a/websocket.go +++ b/websocket.go @@ -6,5 +6,7 @@ type Websocket struct { HandshakeTimeout time.Duration `json:"handshakeTimeout" yaml:"handshakeTimeout" toml:"handshakeTimeout"` ReadBufferSize int `json:"readBufferSize" yaml:"readBufferSize" toml:"readBufferSize"` WriteBufferSize int `json:"writeBufferSize" yaml:"writeBufferSize" toml:"writeBufferSize"` + ReadTimeout time.Duration `json:"readTimeout" yaml:"readTimeout" toml:"readTimeout"` + WriteTimeout time.Duration `json:"writeTimeout" yaml:"writeTimeout" toml:"writeTimeout"` EnableCompression bool `json:"enableCompression" yaml:"enableCompression" toml:"enableCompression"` }