支持注入连接管理实例
This commit is contained in:
@ -12,15 +12,15 @@ import (
|
||||
"github.com/go-developer/websocket/context"
|
||||
)
|
||||
|
||||
var (
|
||||
// Connection 连接管理
|
||||
Connection IConnection
|
||||
)
|
||||
|
||||
func init() {
|
||||
// NewDefaultConnectionManager 默认的内存连接管理实例
|
||||
//
|
||||
// Author : go_developer@163.com<张德满>
|
||||
//
|
||||
// Date : 11:32 下午 2021/4/17
|
||||
func NewDefaultConnectionManager() IConnection {
|
||||
c := &connection{}
|
||||
c.table, _ = easymap.NewSegment(4096, true)
|
||||
Connection = c
|
||||
return c
|
||||
}
|
||||
|
||||
type connection struct {
|
||||
|
Reference in New Issue
Block a user