资源简介

完整版muduo网络库,仅供学习使用

资源截图

代码片段和文件信息

import sys
sys.path.append(‘gen-py‘)

from thrift.transport import TSocket
from thrift.transport import TTransport
from thrift.protocol import TBinaryProtocol

from echo import Echo


def echo(s):
    transport = TSocket.TSocket(‘127.0.0.1‘ 9090)
    tranport = TTransport.TframedTransport(transport)
    protocol = TBinaryProtocol.TBinaryProtocol(tranport)
    client = Echo.Client(protocol)
    tranport.open()
    s = client.echo(s)
    tranport.close()

    return s


def main():
    print(echo(‘42‘))


if __name__ == ‘__main__‘:
    main()

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2017-01-05 21:22  muduo-master\
     文件           6  2017-01-05 21:22  muduo-master\.gitignore
     文件         518  2017-01-05 21:22  muduo-master\.travis.yml
     文件        2647  2017-01-05 21:22  muduo-master\CMakeLists.txt
     文件       12353  2017-01-05 21:22  muduo-master\ChangeLog
     文件       63336  2017-01-05 21:22  muduo-master\Doxyfile
     文件        1641  2017-01-05 21:22  muduo-master\License
     文件       23545  2017-01-05 21:22  muduo-master\MacOSX.diff
     文件         485  2017-01-05 21:22  muduo-master\README
     文件         106  2017-01-05 21:22  muduo-master\TODO
     文件        2824  2017-01-05 21:22  muduo-master\armlinux.diff
     文件       15254  2017-01-05 21:22  muduo-master\backport.diff
     文件         632  2017-01-05 21:22  muduo-master\build.sh
     文件         859  2017-01-05 21:22  muduo-master\clang.diff
     目录           0  2017-01-05 21:22  muduo-master\contrib\
     文件         281  2017-01-05 21:22  muduo-master\contrib\CMakeLists.txt
     目录           0  2017-01-05 21:22  muduo-master\contrib\hiredis\
     文件         101  2017-01-05 21:22  muduo-master\contrib\hiredis\CMakeLists.txt
     文件        5113  2017-01-05 21:22  muduo-master\contrib\hiredis\Hiredis.cc
     文件        2607  2017-01-05 21:22  muduo-master\contrib\hiredis\Hiredis.h
     文件         127  2017-01-05 21:22  muduo-master\contrib\hiredis\README.md
     文件        3305  2017-01-05 21:22  muduo-master\contrib\hiredis\mrediscli.cc
     目录           0  2017-01-05 21:22  muduo-master\contrib\thrift\
     文件         320  2017-01-05 21:22  muduo-master\contrib\thrift\CMakeLists.txt
     文件        3199  2017-01-05 21:22  muduo-master\contrib\thrift\ThriftConnection.cc
     文件        1801  2017-01-05 21:22  muduo-master\contrib\thrift\ThriftConnection.h
     文件        1002  2017-01-05 21:22  muduo-master\contrib\thrift\ThriftServer.cc
     文件        8457  2017-01-05 21:22  muduo-master\contrib\thrift\ThriftServer.h
     目录           0  2017-01-05 21:22  muduo-master\contrib\thrift\tests\
     文件          15  2017-01-05 21:22  muduo-master\contrib\thrift\tests\.gitignore
     文件          46  2017-01-05 21:22  muduo-master\contrib\thrift\tests\CMakeLists.txt
............此处省略457个文件信息

评论

共有 条评论