websocket 增加多分组 fork https://github.com/olahol/melody
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
431 B

10 years ago
  1. package melody
  2. import "time"
  3. type Config struct {
  4. WriteWait time.Duration
  5. PongWait time.Duration
  6. PingPeriod time.Duration
  7. MaxMessageSize int64
  8. MessageBufferSize int
  9. }
  10. func newConfig() *Config {
  11. return &Config{
  12. WriteWait: 10 * time.Second,
  13. PongWait: 60 * time.Second,
  14. PingPeriod: (60 * time.Second * 9) / 10,
  15. MaxMessageSize: 512,
  16. MessageBufferSize: 256,
  17. }
  18. }