Craig Tiller
d1e01ac139
* Add a test for a (now-illegal) build file construct * add to test suite! * fix * fix * fix syntax |
3 years ago | |
---|---|---|
.. | ||
BUILD | Add a test for a (now-illegal) build file construct (#27602) | 3 years ago |
README.cn.md |
…
|
|
README.en.md |
…
|
|
alts_client.py |
…
|
|
alts_server.py |
…
|
|
client.py |
…
|
|
demo.proto |
…
|
|
demo_pb2.py |
…
|
|
demo_pb2_grpc.py |
…
|
|
server.py |
…
|
README.en.md
Data transmission demo for using gRPC in Python
Four ways of data transmission when gRPC is used in Python. Official Guide
-
unary-unary
In a single call, the client can only send request once, and the server can only respond once.
client.py: simple_method
server.py: SimpleMethod
-
stream-unary
In a single call, the client can transfer data to the server an arbitrary number of times, but the server can only return a response once.
client.py: client_streaming_method
server.py: ClientStreamingMethod
-
unary-stream
In a single call, the client can only transmit data to the server at one time, but the server can return the response many times.
client.py: server_streaming_method
server.py: ServerStreamingMethod
-
stream-stream
In a single call, both client and server can send and receive data to each other multiple times.
client.py: bidirectional_streaming_method
server.py: BidirectionalStreamingMethod