增加stop命令

This commit is contained in:
duanhf2012
2020-04-01 16:35:13 +08:00
parent 27ff65726a
commit 9c7a7644ee
8 changed files with 56 additions and 29 deletions

View File

@@ -128,12 +128,14 @@ func (slf *TestServiceCall) Test(){
param.B = "xxxxxxxxxxxxxxxxxxxxxxx"
param.Pa = []string{"ccccc","asfsdfsdaf","bbadfsdf","ewrwefasdf","safsadfka;fksd"}
param.Index = index
slf.AsyncCall("TestService1.RPC_Test",&param, func(reply *Param, err error) {
slf.AsyncCall("TestService1.RPC_Test1",&param, func(reply *Param, err error) {
fmt.Print(reply,"\n")
})
slf.AfterFunc(time.Second*1,slf.Test)
}
func (slf *TestServiceCall) OnRelease(){
fmt.Print("OnRelease")
}
func (slf *TestServiceCall) Run(){
//var ret int
var input int = 1
@@ -163,7 +165,9 @@ func (slf *TestServiceCall) Run(){
func (slf *TestService1) RPC_Test(a *Param,b *Param) error {
//*a = *b
//a = nil
*b = *a
return nil
}