2 min read

Outgoing response

Learn how to create outgoing responses.

A dispatcher returns an outgoing response asynchronously. Since you're implementing this dispatcher, you are responsible to create this outgoing response.

An outgoing response carries:

The payload of a response is a stream of bytes that represents the return value of an operation. The caller (the connection that dispatched the incoming request) reads and logically copies these bytes to the network connection until there is no more byte to read.

In C#, the payload of an outgoing response is split in a payload and a payload continuation, just like the payload of an outgoing request. This split makes the encoding of a response payload more convenient and efficient for the Slice generated code, but is otherwise unnecessary. An outgoing response payload is conceptually one continuous stream of bytes.

Was this page helpful?