1 Star 0 Fork 0

wlemuel/pynhk

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
thriftServer.py 794 Bytes
一键复制 编辑 原始数据 按行查看 历史
Steve Lemuel 提交于 2016-11-21 11:43 . format source code
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
#=============================================================================
# FileName: thriftServer.py
# Desc: test thriftpy
# License: GPL
# Author: Steve Lemuel
# Email: wlemuel@hotmail.com
# Version: 0.0.1
# LastChange: 2015-09-06 14:49:17
# CreatedAt: 2015-09-06 14:49:17
#=============================================================================
"""
import thriftpy
pingpong_thrift = thriftpy.load("thrift/pingpong.thrift",
module_name="pingpong_thrift")
from thriftpy.rpc import make_server
class Dispatcher(object):
def ping(self):
return "pong"
server = make_server(pingpong_thrift.PingPong, Dispatcher(), '0.0.0.0', 6000)
server.serve()
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/wlemuel/pynhk.git
git@gitee.com:wlemuel/pynhk.git
wlemuel
pynhk
pynhk
master

搜索帮助