grpc-python-server-push-example

时间:2021-05-31 07:56:20
【文件属性】:
文件名称:grpc-python-server-push-example
文件大小:43KB
文件格式:ZIP
更新时间:2021-05-31 07:56:20
Python grpc-python-server-push-example 警告! 我不知道这是否是实现服务器推送的正确方法。 构建流-流连接。 在客户端,通过元数据传递客户端的 id。 存根应该返回一个迭代器,调用该方法的next()方法会阻塞,因为服务器还没有响应。 在服务器端,当它收到第一个请求时,构造一个新的Queue 。 然后,通过Queue.get()阻止读取此队列。 一旦将一些新数据写入此队列,服务器将向客户端发出响应。 在这个例子中,writter 是一个在另一个线程中调用的标准input 。
【文件预览】:
grpc-python-server-push-example-master
----test_pb2_grpc.pyc(2KB)
----test.proto(341B)
----Makefile(93B)
----client.py(2KB)
----server.py(6KB)
----README.md(743B)
----screenshoot.gif(45KB)
----__pycache__()
--------test_pb2_grpc.cpython-36.pyc(2KB)
--------test_pb2_grpc.cpython-35.pyc(2KB)
--------test_pb2.cpython-35.pyc(4KB)
----test_pb2_grpc.py(2KB)
----test_pb2.py(6KB)

网友评论