コード例 #1
0
ファイル: jsonrpc.go プロジェクト: peer23peer/quasar
func executeJSONRPCEx(method string, retVal interface{}, args []interface{}) error {
	if args == nil {
		args = Args{}
	}
	conn, err := getConnection(XBMCExJSONRPCHosts...)
	if err != nil {
		panic(err)
	}
	defer conn.Close()

	client := jsonrpc.NewClient(conn)
	return client.Call(method, args, retVal)
}
コード例 #2
0
ファイル: jsonrpc.go プロジェクト: i96751414/quasar
func executeJSONRPCEx(method string, retVal interface{}, args []interface{}) error {
	if args == nil {
		args = Args{}
	}
	conn, err := getConnection(XBMCExJSONRPCHosts...)
	if err != nil {
		log.Error(err.Error())
		Notify("Quasar", "executeJSONRPCEx failed, check your logs.", "")
	}
	defer conn.Close()

	client := jsonrpc.NewClient(conn)
	return client.Call(method, args, retVal)
}