38 lines
1.1 KiB
Go
38 lines
1.1 KiB
Go
package server
|
|
|
|
import "time"
|
|
|
|
const (
|
|
// DefaultConcurrency is the default number of concurrent rpc calls
|
|
// the server can process.
|
|
DefaultConcurrency = 8 * 1024
|
|
|
|
// DefaultRequestTimeout is the default timeout for client request.
|
|
DefaultRequestTimeout = 20 * time.Second
|
|
|
|
// DefaultPendingMessages is the default number of pending messages
|
|
// handled by Client and Server.
|
|
DefaultPendingMessages = 32 * 1024
|
|
|
|
// DefaultFlushDelay is the default delay between message flushes
|
|
// on Client and Server.
|
|
DefaultFlushDelay = -1
|
|
|
|
// DefaultBufferSize is the default size for Client and Server buffers.
|
|
DefaultBufferSize = 64 * 1024
|
|
|
|
// DefaultKeepAlivePeriod is the default time for KeepAlivePeriod of connection.
|
|
DefaultKeepAlivePeriod = 0
|
|
|
|
// DefaultMaxMessageSize is default size for a message read from the peer
|
|
DefaultMaxMessageSize = 4096
|
|
// DefaultReadTimeout is default value of read timeout
|
|
DefaultReadTimeout = 0
|
|
// DefaultWriteTimeout is default value of write timeout
|
|
DefaultWriteTimeout = 0
|
|
|
|
DefaultHandshakeTimeout = 0
|
|
|
|
DefaultKeepAlive = 0
|
|
)
|