新增rpc自定义超时

This commit is contained in:
duanhf2012
2023-07-13 16:42:23 +08:00
parent 85a8ec58e5
commit 4b84d9a1d5
8 changed files with 251 additions and 113 deletions

View File

@@ -68,7 +68,16 @@ type Call struct {
connId int
callback *reflect.Value
rpcHandler IRpcHandler
callTime time.Time
TimeOut time.Duration
}
type RpcCancel struct {
Cli *Client
CallSeq uint64
}
func (rc *RpcCancel) CancelRpc(){
rc.Cli.RemovePending(rc.CallSeq)
}
func (slf *RpcRequest) Clear() *RpcRequest{