新增对Rpc连接事件的监听

This commit is contained in:
boyce
2020-12-05 11:37:11 +08:00
parent dfba2fbe47
commit 9bad0037aa
5 changed files with 124 additions and 1 deletions

View File

@@ -55,6 +55,12 @@ type RpcHandler struct {
callResponseCallBack chan *Call //异步返回的回调
}
type TriggerRpcEvent func(bConnect bool,nodeId int)
type IRpcListener interface {
OnRpcConnected(nodeId int)
OnRpcDisconnect(nodeId int)
}
type IRpcHandler interface {
GetName() string
InitRpcHandler(rpcHandler IRpcHandler,getClientFun FuncRpcClient,getServerFun FuncRpcServer)