first version

This commit is contained in:
Ola Holmström
2015-05-13 22:37:17 +02:00
commit fb9197b6ff
12 changed files with 648 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
package melody
import "time"
type Config struct {
WriteWait time.Duration
PongWait time.Duration
PingPeriod time.Duration
MaxMessageSize int64
MessageBufferSize int
}
func newConfig() *Config {
return &Config{
WriteWait: 10 * time.Second,
PongWait: 60 * time.Second,
PingPeriod: (60 * time.Second * 9) / 10,
MaxMessageSize: 512,
MessageBufferSize: 256,
}
}