Hello Guys.

A quick question is that: If i use one completion queue in server side to 
handle all of the connections, for each return from cq.AsyncNext, how do i 
know which connection it is.

Explanation: based 
on https://github.com/grpc/grpc/blob/master/doc/core/epoll-polling-engine.md, 
I know one completion queue has one pollset. In server side, i can open 1 
CQ and it could handle multiple connections. In greeter_async_server.cc 
(helloworld example), server process each rpc service by calling 
cq->Next(&tag, &ok), then static_cast tag into CallData, and call 
ServerAsyncResponseWriter.*Finish* to reply data to client. cq->Next will 
call AsyncNextInternal, inside which, it will call 
grpc_completion_queue_next and FinalizeResult. *FinalizeResult* will 
deserailize message from connections. So I think 
ServerAsyncResponseWriter.*Finish 
*is used to send message, and *FinalizeResult *is used to receive message. 
But how do I know where the message come from or send to if I use one 
completion queue in server side?

Thanks in advance for all the insights.

-- 
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 grpc-io+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/95c85a12-304f-4849-afeb-60f2dc5e9e74n%40googlegroups.com.

Reply via email to