增加配置连接管理的实例

This commit is contained in:
白茶清欢 2021-04-22 22:49:38 +08:00
parent c0d0ce60ba
commit 0dc7b6fcdc
1 changed files with 14 additions and 0 deletions

View File

@ -135,6 +135,20 @@ func DisableStoreConnection() SetWSServerConfig {
} }
} }
// SetConnectionManager 连接管理实例
//
// Author : go_developer@163.com<张德满>
//
// Date : 10:48 下午 2021/4/22
func SetConnectionManager(manager storage.IConnection) SetWSServerConfig {
return func(wsc *WSServerConfig) {
if nil == manager {
manager = storage.NewDefaultConnectionManager()
}
wsc.ConnectionManager = manager
}
}
// SetMaxMessageSize 限制消息大小 // SetMaxMessageSize 限制消息大小
// //
// Author : go_developer@163.com<张德满> // Author : go_developer@163.com<张德满>