Beispiel #1
0
func main() {
	runtime.GOMAXPROCS(runtime.NumCPU())
	go func() {
		runtime.LockOSThread()
		C.hxmain()
	}()
	r1 := Call([]interface{}{"Server", "foo"}, []interface{}{4, 2})
	fmt.Printf("Server.foo r1=%#v:%T\n", r1, r1)
	r2 := Call([]interface{}{"Server", "foo"}, []interface{}{0, 0})
	fmt.Printf("Server.foo r2=%#v:%T\n", r2, r2)

	r3 := Call([]interface{}{"Server", "bar"}, []interface{}{4.2, 4.2})
	fmt.Printf("Server.bar r3=%#v:%T\n", r3, r3)
	r4 := Call([]interface{}{"Server", "bar"}, []interface{}{float64(0), float64(0)})
	fmt.Printf("Server.bar r4=%#v:%T\n", r4, r4)

}
Beispiel #2
0
func main() {
	example.Register()
	go example.RRPC()
	C.hxmain()
}