You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
586 B
24 lines
586 B
package zrouter
|
|
|
|
import (
|
|
"github.com/aceld/zinx/ziface"
|
|
"github.com/aceld/zinx/zlog"
|
|
"github.com/aceld/zinx/znet"
|
|
)
|
|
|
|
type HelloZinxRouter struct {
|
|
znet.BaseRouter
|
|
}
|
|
|
|
//HelloZinxRouter Handle
|
|
func (this *HelloZinxRouter) Handle(request ziface.IRequest) {
|
|
zlog.Debug("Call HelloZinxRouter Handle")
|
|
//先读取客户端的数据,再回写ping...ping...ping
|
|
zlog.Debug("recv from client : msgId=", request.GetMsgID(), ", data=", string(request.GetData()))
|
|
|
|
err := request.GetConnection().SendBuffMsg(1, []byte("Hello Zinx Router V0.10"))
|
|
if err != nil {
|
|
zlog.Error(err)
|
|
}
|
|
}
|
|
|