增加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

@@ -6,18 +6,6 @@
"NodeName": "Node_Test1",
"remark":"//以_打头的表示只在本机进程不对整个子网开发",
"ServiceList": ["TestService1","TestService2","TestServiceCall","GateService","TcpService"]
},
{
"NodeId": 2,
"ListenAddr":"127.0.0.1:8002",
"NodeName": "Node_Gate2",
"ServiceList": ["SubNet1_Service"]
},
{
"NodeId": 3,
"ListenAddr":"127.0.0.1:8003",
"NodeName": "Node_Room",
"ServiceList": ["SubNet1_Service"]
}
]
}

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
}