I'm using com.squareup.wire.GrpcStreamingCall along with OkHttp in a Kotlin mobile app to stream gRPC events from a backend service. The issue I'm facing is that the client does not receive the streamed packets in real-time.
Instead, all packets are buffered internally and delivered together only when the server closes the connection or times out the session (e.g., after 5 minutes). This defeats the purpose of a streaming connection.
There is no any problem from backend side, API's are working fine in Postman.
Expected Behavior
- Packets should be delivered immediately to the client as the server sends them (real-time).
- The GrpcStreamingCall.response flow should emit each message as it arrives on the wire.
Actual Behavior
- Packets are only emitted from the flow after several minutes — when the session is closed/timed out.
- All buffered packets arrive together at once, as if they were delayed or cached.
Please help me out in fixing this problem