Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Client.CallServerStream should populate spec and peer of Request (#487)
Neither `ServerStream` nor `ServerStreamForClient` include `Spec()` and `Peer()` methods. This is presumably because the signatures for handlers and stubs includes a `Request`, which _does_ have these methods. However, on the client side, when invoking a server stream, these fields were never populated on the `Request`. They are technically still accessible via `stream.Conn()`. But since `ClientStream` and `BidiStream` have methods for these, without making the caller poke into the underlying conn, it seemed like this was likely not the expected way to retrieve these attributes. So this PR simply updates the client-side stub so that calling a server-stream method _does_ populate the relevant fields of the `Request`. This provides convenient and consistent access to these fields for client code.
- Loading branch information