增加对长连接消息体以及探活配置

This commit is contained in:
白茶清欢 2021-04-22 22:04:56 +08:00
parent 8a19bed17b
commit c0d0ce60ba

View File

@ -224,6 +224,9 @@ func NewWSServerConfig(optionList ...SetWSServerConfig) *WSServerConfig {
} }
c.MaxMessageSize = DefaultMaxMessageSize c.MaxMessageSize = DefaultMaxMessageSize
c.MessageBufferSize = DefaultMaxMessageBufferSize c.MessageBufferSize = DefaultMaxMessageBufferSize
c.PingPeriod = time.Duration(DefaultPingPeriod) * time.Second
c.WriteWait = time.Duration(DefaultWriteWait) * time.Second
c.PongWait = time.Duration(DefaultPongWait) * time.Second
for _, o := range optionList { for _, o := range optionList {
o(c) o(c)
} }