itf2rpc

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 23, 2022 License: MIT Imports: 10 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// NetDotConn net.conn .
	NetDotConn = "net.Conn"
	// SmnBase smn_base .
	SmnBase = "github.com/ProtossGenius/SureMoonNet/pb/smn_base"
	// SmnRPC smn_rpc .
	SmnRPC = "github.com/ProtossGenius/smnric/net_libs/smn_rpc"
	// SmnConnFunc .
	SmnConnFunc = "smn_rpc.ConnFunc"
)

Variables

View Source
var ErrAsynClientHaveConn = errors.New("AsynClint not support user-def conn")

ErrAsynClientHaveConn .

View Source
var GoAsynClientRoutines = 10

GoAsynClientRoutines how many routines to deal with result.

View Source
var TargetMap = map[string]FWriteRPC{
	"go_s":  GoSvr,
	"go_c":  GoClient,
	"go_ac": GoAsynClient,
	"cpp_c": CppClient,
	"cpp_s": CppServer,
}

TargetMap from target to func.

Functions

func CppClient

func CppClient(path, module, itfFullPkg string, itf *smn_pglang.ItfDef) error

func CppFillPb

func CppFillPb(pbName string, f *smn_pglang.VarDef, varName string, writef func(f string, a ...interface{}))

CppFillPb .

func CppServer

func CppServer(path, module, itfFullPkg string, itf *smn_pglang.ItfDef) error

CppServer SMNRPC server code product.

func GoAsynClient

func GoAsynClient(path, module, itfFullPkg string, itf *smn_pglang.ItfDef) error

GoAsynClient interface to go client RPC code.

func GoClient

func GoClient(path, module, itfFullPkg string, itf *smn_pglang.ItfDef) error

GoClient interface to go client RPC code.

func GoSvr

func GoSvr(path, module, itfFullPkg string, itf *smn_pglang.ItfDef) error

GoSvr write to go server RPC code.

func Write

func Write(target, path, module, itfFullPkg string, itf *smn_pglang.ItfDef) error

Write itf to rpc.

Types

type FWriteRPC

type FWriteRPC func(path, module, itfFullPkg string, itf *smn_pglang.ItfDef) error

FWriteRPC write RPC.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL