server-go/const.go

39 lines
1.3 KiB
Go
Raw Normal View History

2018-04-03 08:55:48 +00:00
package server
2018-04-04 07:19:43 +00:00
import "time"
2018-04-03 08:55:48 +00:00
const (
2018-04-04 04:01:26 +00:00
// DefaultConcurrency is the maximum number of concurrent connections
// the Server may serve by default (i.e. if Server.Concurrency isn't set).
DefaultConcurrency = 256 * 1024
2018-04-04 05:31:10 +00:00
DefaultKeepAlive = 0
2018-04-04 04:01:26 +00:00
// DefaultHandshakeTimeout is default value of websocket handshake Timeout
2018-04-03 08:55:48 +00:00
DefaultHandshakeTimeout = 0
2018-04-04 04:01:26 +00:00
// DefaultReadBufferSize is default value of Read Buffer Size
DefaultReadBufferSize = 0
// DefaultWriteBufferSize is default value of Write Buffer Size
DefaultWriteBufferSize = 0
// DefaultReadTimeout is default value of read timeout
DefaultReadTimeout = 0
// DefaultWriteTimeout is default value of write timeout
DefaultWriteTimeout = 0
// DefaultEnableCompression is default value of support compression
DefaultEnableCompression = false
// DefaultMaxMessageSize is default size for a message read from the peer
DefaultMaxMessageSize = 4096
// DefaultPongTimeout is default value of websocket pong Timeout
2018-04-04 07:19:43 +00:00
DefaultPongTimeout = 60 * time.Second
2018-04-04 04:01:26 +00:00
// DefaultPingTimeout is default value of websocket ping Timeout
2018-04-04 07:19:43 +00:00
DefaultPingTimeout = 10 * time.Second
2018-04-04 04:01:26 +00:00
// DefaultPingPeriod is default value of send ping period
2018-04-04 07:19:43 +00:00
DefaultPingPeriod = (DefaultPingTimeout * 9) / 10
2018-04-04 13:28:35 +00:00
2018-04-04 16:51:34 +00:00
DefaultReconnectInterval = 5 * time.Second
2018-04-04 13:28:35 +00:00
DefaultReconnectTryTime = 10
2018-06-27 12:31:50 +00:00
DefaultCompressionThreshold = 1024
2018-04-03 08:55:48 +00:00
)