mirror of
https://github.com/unclechu/gRPC-haskell.git
synced 2024-11-17 00:29:42 +01:00
14 lines
358 B
Python
14 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()
|