完成基本的server启动以及example
This commit is contained in:
@ -7,7 +7,9 @@
|
||||
// Date : 2021-03-27 6:32 下午
|
||||
package abstract
|
||||
|
||||
import "github.com/go-developer/websocket/context"
|
||||
import (
|
||||
"github.com/go-developer/websocket/context"
|
||||
)
|
||||
|
||||
// IWebsocket 接口约束
|
||||
//
|
||||
@ -27,24 +29,24 @@ type IWebsocket interface {
|
||||
//
|
||||
// Date : 6:40 下午 2021/3/27
|
||||
Disconnect(ctx *context.WSContext)
|
||||
// Message 收到客户端指令时处理的方法
|
||||
// Close 关闭连接
|
||||
//
|
||||
// Author : go_developer@163.com<张德满>
|
||||
//
|
||||
// Date : 6:40 下午 2021/3/27
|
||||
Message(ctx *context.WSContext)
|
||||
// Date : 8:43 下午 2021/3/27
|
||||
Close(ctx *context.WSContext, code int, message string) error
|
||||
// HandshakeURL 注册的websocket路由
|
||||
//
|
||||
// Author : go_developer@163.com<张德满>
|
||||
//
|
||||
// Date : 6:45 下午 2021/3/27
|
||||
HandshakeURL() []string
|
||||
// RegisterCommand 注册长连接模块支持的命令
|
||||
// GetCommandList 注册长连接模块支持的命令
|
||||
//
|
||||
// Author : go_developer@163.com<张德满>
|
||||
//
|
||||
// Date : 6:48 下午 2021/3/27
|
||||
RegisterCommand()
|
||||
GetCommandList() []ICommand
|
||||
// GetModuleFlag 获取模块标识,全局唯一
|
||||
//
|
||||
// Author : go_developer@163.com<张德满>
|
||||
|
Reference in New Issue
Block a user