mirror of
https://github.com/unclechu/gRPC-haskell.git
synced 2024-12-27 04:09:45 +01:00
ce56953b24
* initial echo client/server examples * registered and unregistered versions of the example client * ignore pyc files * cpp echo code, flag to build examples * threaded server example
13 lines
358 B
Python
13 lines
358 B
Python
from grpc.beta import implementations
|
|
|
|
import echo_pb2
|
|
|
|
def main():
|
|
for _ in xrange(1000):
|
|
channel = implementations.insecure_channel('localhost', 50051)
|
|
stub = echo_pb2.beta_create_Echo_stub(channel)
|
|
message = echo_pb2.EchoRequest(message='foo')
|
|
response = stub.DoEcho(message, 15)
|
|
|
|
if __name__ == '__main__':
|
|
main()
|