首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > Python > Python的RPC包快。

Python的RPC包快。

  • 资源大小:10.16 kB
  • 上传时间:2021-06-29
  • 下载次数:0次
  • 浏览次数:1次
  • 资源积分:1积分
  • 标      签: python rpc

资 源 简 介

jpc is a fast Python JSON RPC package, partially compliant with JSON-RPC version 1 (http://json-rpc.org/wiki/specification). Serve a method: ``` import jpc class MyHandler(jpc.BaseHandler): def echo(self, str): return str jpc.start_server(host="localhost", port=50000, handler=MyHandler) ``` Call a method on server: c = jpc.connect(host="localhost", port=50000)jpc.Proxy(c).echo("Hello, world!") The host and port parameters of start_server() and connect() are optional. To send JSON RPC notifications replace the Proxy class with the Notifier class. Notifications are "asynchronous" and an order of magnitude faster than calls. Benchmarks off a 2.4GHz Core 2 Duo laptop: * Create-call-close 4000 connections per second per process. * Up to 13,000 calls per second per process. * Up to 40,000 notifications per second per process. Notes: * T

文 件 列 表

jpc-1.0.7
.hgignore
.hgtags
LICENSE
README
jpc
__init__.py
setup.py
tests
jpc-runner.py
.hg_archival.txt

相 关 资 源

您 可 能 感 兴 趣 的

同 类 别 推 荐

VIP VIP
0.174557s