增加建立以及断开连接时,移除连接
This commit is contained in:
26
storage/IStorage.go
Normal file
26
storage/IStorage.go
Normal file
@ -0,0 +1,26 @@
|
||||
// Package storage ...
|
||||
//
|
||||
// Description : 各种内存数据的管理,基于接口,可自己重新实现管理实例
|
||||
//
|
||||
// Author : go_developer@163.com<张德满>
|
||||
//
|
||||
// Date : 2021-04-08 5:29 下午
|
||||
package storage
|
||||
|
||||
import "github.com/go-developer/websocket/context"
|
||||
|
||||
// IConnection 连接管理接口定义
|
||||
//
|
||||
// Author : go_developer@163.com<张德满>
|
||||
//
|
||||
// Date : 5:30 下午 2021/4/8
|
||||
type IConnection interface {
|
||||
// Store 存储
|
||||
Store(ctx *context.WSContext)
|
||||
// Del 移除
|
||||
Del(ctx *context.WSContext)
|
||||
// GetCtxList 获取连接列表
|
||||
GetCtxList(cidList ...string) []*context.WSContext
|
||||
// Clear 清空连接
|
||||
Clear(message string)
|
||||
}
|
||||
Reference in New Issue
Block a user