feat 排队

This commit is contained in:
2026-01-06 18:36:17 +08:00
parent 6523820cf6
commit 97c7813a24
9 changed files with 600 additions and 86 deletions

View File

@@ -28,9 +28,9 @@ const (
// ISocketServer 由应用层实现
type ISocketServer interface {
OnOpen(ISocketConn) ([]byte, Action) // 开启连接
OnHandShake(ISocketConn, []byte, func(ISocketConn, []byte)) Action // 开始握手
OnMessage(ISocketConn, []byte) Action // 收到消息
OnOpen(ISocketConn) ([]byte, Action) // 开启连接
OnHandShake(ISocketConn) Action // 开始握手
OnMessage(ISocketConn, []byte) Action // 收到消息
OnPong(ISocketConn)
OnClose(ISocketConn, error) Action // 关闭连接
OnTick() (time.Duration, Action)