>  Am I doing something wrong?

IMHO there must be something different.

The generated method "counter()" should be const (at least with new protoc 
compilers), therefor it cannot have any impact if you call it or not.


On Wednesday, May 10, 2023 at 4:58:33 PM UTC+2 Matteo Stefanini wrote:

> Hi everyone,
>
> I'm trying to send an integer back to the client but no data are sent. 
> The only solution found is to call 'response->counter()' before sending it
>
> message Response 
> {
> string message = 1;
> uint32 time_ms = 2;
> bool is_over = 3;
> uint32 counter = 4;
> }
>
>
> Status Step(ServerContext* context, const service::Request* request, 
> service::Response* response) override 
> {
> response->set_message( "step_success" );
> response->set_is_over( true );
> response->set_counter( 10 );
> response->counter();
>
> return Status::OK;
> }
>
> Am I doing something wrong? 
>

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/3a2ca638-f273-4039-a22d-2d38c97edfden%40googlegroups.com.

Reply via email to