Client
Server

`send_request` [auto]

`HEADERS` frame

request accepted

`send_message`

`DATA` ... `DATA` frames

`recv_message`

Now you have to end stream from the client-side, and you can do this in two ways:

1. `send_message(message, end=True)` - last `DATA` frame will contain `END_STREAM` flag
2. `end()` - one extra frame will be sent, as shown below. It is better to avoid this way if possible.

`end` (optional, read note above)

`HEADERS[END_STREAM]` frame

`send_initial_metadata` [auto] You can send initial metadata even before receiving messages from the client. RPC success or failure in gRPC protocol is indicated in trailers.

`HEADERS` frame

`recv_initial_metadata` [auto]

`send_message`

`DATA` ... `DATA` frames

`recv_message`

`send_trailing_metadata` [auto]

`HEADERS` frame as trailers

`recv_trailing_metadata` [auto]

Client
Server