1package melody
2
3import "time"
4
5// Config melody configuration struct.
6type Config struct {
7	WriteWait         time.Duration // Milliseconds until write times out.
8	PongWait          time.Duration // Timeout for waiting on pong.
9	PingPeriod        time.Duration // Milliseconds between pings.
10	MaxMessageSize    int64         // Maximum size in bytes of a message.
11	MessageBufferSize int           // The max amount of messages that can be in a sessions buffer before it starts dropping them.
12}
13
14func newConfig() *Config {
15	return &Config{
16		WriteWait:         10 * time.Second,
17		PongWait:          60 * time.Second,
18		PingPeriod:        (60 * time.Second * 9) / 10,
19		MaxMessageSize:    512,
20		MessageBufferSize: 256,
21	}
22}
23