提交origin2.0版本

This commit is contained in:
duanhf2012
2020-03-28 09:57:16 +08:00
parent 0d98f77d07
commit 84fb8ab36d
111 changed files with 3657 additions and 8382 deletions

View File

@@ -0,0 +1,27 @@
package serviceTest
import (
"fmt"
"github.com/duanhf2012/originnet/service"
"time"
)
type OriginServerTwo struct {
service.Service
}
func (slf *OriginServerTwo) RPC_TestCall(a *int,b *int) error {
fmt.Printf("OriginServerTwo\n")
*a = *b*2
//slf.AfterFunc(time.Second,slf.Test)
return nil
}
func (slf *OriginServerTwo) RPC_TestAsyncCall(a *int, reply *TestAsyn) error {
fmt.Printf("OriginServerTwo async start sleep %d\n", *a)
time.Sleep(time.Second)
reply.a = *a
reply.b = "fuck!"
return nil
}