Thrift 的 Python 版本 ThriftPy

码农软件 · 软件分类 · 网络工具包 · 2019-02-27 11:41:45

软件介绍

ThriftPy 是 Apache Thrift 的 Python 语言移植版本。

服务器端示例代码:

import thriftpy
from thriftpy.rpc import make_server

pingpong = thriftpy.load("pingpong.thrift")

class Dispatcher(object):
    def ping(self):
        return "pong"

server = make_server(pingpong.PingPong, Dispatcher(), '127.0.0.1', 6000)
server.serve()

客户端:

import thriftpy
from thrift.rpc import make_client

pingpong = thriftpy.load("pingpong.thrift")

client = make_client(pingpong.PingPong, '127.0.0.1', 6000)
client.ping()

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

追踪Linux TCP/IP代码运行

追踪Linux TCP/IP代码运行

秦健 / 北京航空航天大学出版社 / 2010-4-1 / 69.00元

本书以应用程序为线索,详细描述了数据包在协议栈的分段、重组、发送、接收过程,同时分析了路由的初始化和设置过程,主要包括socket应用程序、 TCP/IP协议、路由、通知链、邻居子系统等内容。全书涵盖了协议栈的全部知识点,对于广大的读者来说这是一本极其难得的技术资料。同时,书中论述了网络设备的工作原理,解释了RTL8169和嵌入式CS8900、DM9000网卡设备的核心过程。一起来看看 《追踪Linux TCP/IP代码运行》 这本书的介绍吧!

SHA 加密
SHA 加密

SHA 加密工具

HSV CMYK 转换工具
HSV CMYK 转换工具

HSV CMYK互换工具