38 lines
711 B
Go
38 lines
711 B
Go
|
/*
|
||
|
* 版权所有 (c) 上海元泓软件科技有限公司 2023.
|
||
|
* 严禁通过任何媒介未经授权复制本文件.
|
||
|
*
|
||
|
* 作者:mic
|
||
|
* Email:funui@outlook.com
|
||
|
*/
|
||
|
|
||
|
/*
|
||
|
* 版权所有 (c) 上海元泓软件科技有限公司 2022.
|
||
|
* 严禁通过任何媒介未经授权复制本文件.
|
||
|
*
|
||
|
* 作者:mic
|
||
|
* Email:funui@outlook.com
|
||
|
*/
|
||
|
|
||
|
package wsgnet
|
||
|
|
||
|
import (
|
||
|
"github.com/panjf2000/gnet/v2"
|
||
|
)
|
||
|
|
||
|
type (
|
||
|
HandlerFunc func(gnet.Conn, *YHProto.EchoPackage)
|
||
|
//PackageHandler interface {
|
||
|
// Handle(gnet.Conn, *protocol.EchoPackage) error
|
||
|
//}
|
||
|
// A handlers is a socket cmd.
|
||
|
Route struct {
|
||
|
Command uint16 //operation command code
|
||
|
Handler HandlerFunc
|
||
|
}
|
||
|
|
||
|
featuredRoutes struct {
|
||
|
routes []Route
|
||
|
}
|
||
|
)
|