-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
stream-stream rpc method send\receive in any order #100
Comments
Can you show an example of what is not possible in grpclib? |
Sure. Here it is:
proto:
Actually, the code is more complex. Here is what I want to do:
|
async with stub.Subscribe.open() as stream:
...
# exchange messages
...
await asyncio.wait(tasks)
await stream.end() # !!! Maybe this will be improved in the future, but it is possible to make stream-stream requests with |
|
I understand it. But my approach is another. Here is working example of bidirectional streaming with
|
Can you show a traceback you have when you try the same approach with grpclib? And can you show the same working example but with grpclib and with my tip about adding |
I do not want to mark sending as ended. I want to send and receiive infinitly. Send initial data, waiting for receiving. Then sending again and waiting again. And again and again. Then, maybe, receiving data multiple times, then send and receive again. |
In my example I placed |
|
@malarinv call For some reason generated documentation at https://grpclib.readthedocs.io/en/latest/client.html is incomplete. This method is documented, but I don't see any Stream's method in the docs. |
fixed: https://grpclib.readthedocs.io/en/latest/client.html#grpclib.client.Stream.send_request |
thanks. sorry, missed your last message |
@AcLr Can you show a working example of bidirectional stream client? If you succeed. |
There was a mistake in the docs: 2e9d222 |
GRPC docs says:
Looks like on client-side I can send message to a stream, then read from the stream, then send message, then read and so on....
But current grpclib implementation does not allow it. Is it possible to change that? :)
The text was updated successfully, but these errors were encountered: