mirror of
https://github.com/duanhf2012/origin.git
synced 2026-02-12 22:54:43 +08:00
增加stop命令
This commit is contained in:
@@ -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"]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -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",¶m, func(reply *Param, err error) {
|
||||
slf.AsyncCall("TestService1.RPC_Test1",¶m, 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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user