I've noticed that in case of the java client code, calling 
`requestObserver.onCompleted()` results in a call to `
io.netty.handler.codec.http2.DefaultHttp2FrameWriter.writeData(...) 
<https://github.com/netty/netty/blob/18e92304a700c1b3664f5a3cf24ee3ed58bafbdd/codec-http2/src/main/java/io/netty/handler/codec/http2/DefaultHttp2FrameWriter.java#L136>`
 
with `endStream` param set to `true` in case of netty, and in case of 
okHttp in a call to `io.grpc.okhttp.internal.framed.Http2.Writer.data() 
<https://github.com/grpc/grpc-java/blob/d4e90a78fdb6af6579364c4b622edbfad9ebf37f/okhttp/third_party/okhttp/main/java/io/grpc/okhttp/internal/framed/Http2.java#L493>`
 
with `outFinished` param set to `true`. In both cases this results in 
`END_STREAM` flag to be set, so it seems my guess was correct. However some 
confirmation from someone more familiar with the protocol internals would 
be welcomed :)

Thanks!

On Sunday, May 30, 2021 at 2:26:51 PM UTC+7 Piotr Morgwai Kotarbinski wrote:

> Hi all,
> I was reading the protocol overview here 
> https://github.com/grpc/grpc/blob/master/CONCEPTS.md#abstract-grpc-protocol
> One thing that is unclear to me is how a streaming client signals end of 
> its stream to a server (so called 'client half-closing'). The abstract part 
> says nothing about it. My only guess that in case of HTTP/2 implementation 
> clients basically close their input stream, but not sure about it. Could 
> someone with a deep knowledge of the protocol clarify this please?
>
> Thanks!
>

-- 
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/87e3fc86-f3c4-4c5a-8be7-e0b773b078d1n%40googlegroups.com.

Reply via email to