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://codercto.com/soft/d/3340.html

The Little Typer

The Little Typer

Daniel P. Friedman、David Thrane Christiansen、Duane Bibby、Robert Harper、Conor Mcbride / MIT Press / 2018-10-16 / GBP 30.00

An introduction to dependent types, demonstrating the most beautiful aspects, one step at a time. A program's type describes its behavior. Dependent types are a first-class part of a language, and are......一起来看看 《The Little Typer》 这本书的介绍吧!

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

在线压缩/解压 JS 代码

XML、JSON 在线转换
XML、JSON 在线转换

在线XML、JSON转换工具

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

RGB CMYK 互转工具