Skip to content
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

Make possible to limit the size of the incomming/outgoing messages. #212

Open
semlanik opened this issue Apr 9, 2021 · 0 comments
Open
Assignees
Labels
feature New feature to be implemented grpc QtGrpc related issues
Milestone

Comments

@semlanik
Copy link
Owner

semlanik commented Apr 9, 2021

Problem description
Following the question raised in #209 I found out that the reference implementation of gRPC currently has the message size limits. This also should be implemented in QtGrpc as the channel options(I think everyone could agree that it should be a session-specific option)

Suggestion/solution

  • Add the following methods to the QAbstractGrpcChannel interface:
void setMaxSendMessageSize(int size);
void setMaxRecvMessageSize(int size);
  • Check the maximum message size before actually send it or after receiving the incoming message and trigger a channel-based error if the message doesn't fit the limits.

Alternatives
N/A

Additional context
There should be another task that will require breaking the outgoing messages that are bigger than MAX_UINT32 into chunks when sending over HTTP2 channel. It's necessary since the grcp message size "header" is only 4 bytes length.

@semlanik semlanik added grpc QtGrpc related issues feature New feature to be implemented labels Apr 9, 2021
@semlanik semlanik self-assigned this Apr 9, 2021
@semlanik semlanik added this to the v0.7.0 milestone Apr 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature to be implemented grpc QtGrpc related issues
Projects
None yet
Development

No branches or pull requests

1 participant