JSON-RPC 库工具 ReflectRPC

码农软件 · 软件分类 · RPC/XMLRPC项目 · 2019-04-11 11:58:59

软件介绍

ReflectRPC 是一款JSON-RPC 库工具,用于创建自描述RPC服务。

特性:

  • 注册和RPC调用的文件是在一个地方

  • 类型检查

  • 特殊的RPC 调用可获得服务、函数、访问类型的描述

  • 可以通过Shell(rpcsh)去了解一个RPC服务,以及调用到它的函数

  • 强大的基类,支持可扩展

  • 支持自定义枚举类型和哈希值,类似C

  • 基于Twisted服务,支持TCP、UNIX 域套接字、line-based plain sockets、HTTP、 HTTP Basic Auth、 TLS、和TLS客户端认证

  • 支持动态创建HTML 页面

使用示例:

创建一个函数并注册

import reflectrpc
import reflectrpc.simpleserver

def add(a, b):
    return int(a) + int(b)

rpc = reflectrpc.RpcProcessor()

add_func = reflectrpc.RpcFunction(add, 'add', 'Adds two numbers', 'int',
        'Sum of the two numbers')
add_func.add_param('int', 'a', 'First int to add')
add_func.add_param('int', 'b', 'Second int to add')
rpc.add_function(add_func)

server = reflectrpc.simpleserver.SimpleJsonRpcServer(rpc, 'localhost', 5500)
server.run()

连接到服务器

rpcsh localhost 5500

本文地址:https://www.codercto.com/soft/d/3340.html

Agile Web Development with Rails 4

Agile Web Development with Rails 4

Sam Ruby、Dave Thomas、David Heinemeier Hansson / Pragmatic Bookshelf / 2013-10-11 / USD 43.95

Ruby on Rails helps you produce high-quality, beautiful-looking web applications quickly. You concentrate on creating the application, and Rails takes care of the details. Tens of thousands of deve......一起来看看 《Agile Web Development with Rails 4》 这本书的介绍吧!

JS 压缩/解压工具
JS 压缩/解压工具

在线压缩/解压 JS 代码

html转js在线工具
html转js在线工具

html转js在线工具

RGB CMYK 转换工具
RGB CMYK 转换工具

RGB CMYK 互转工具