---
title: "Outgoing response"
description: "Learn how to create outgoing responses."
url: https://docs.icerpc.dev/icerpc/dispatch/outgoing-response
docs_index: https://docs.icerpc.dev/llms.txt
---

> For an index of every page, see [llms.txt](https://docs.icerpc.dev/llms.txt).

# Outgoing response

Learn how to create outgoing responses.

## Creating an outgoing response

A [dispatcher](https://docs.icerpc.dev/icerpc/dispatch/dispatch-pipeline.md#the-dispatcher-abstraction) returns an outgoing response asynchronously. Since you're implementing this dispatcher, you are responsible for creating this outgoing response.

An outgoing response carries:

- a [status code](https://docs.icerpc.dev/icerpc/invocation/incoming-response.md#status-code)
- an error message, set only when the status code is not `Ok`
- response [fields](https://docs.icerpc.dev/icerpc/invocation/incoming-response.md#response-fields)
- the [payload](#response-payload) of the response

## Response payload

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 are no more bytes to read.

In C#, the payload of an outgoing response is split into a payload and a payload continuation, just like the payload of an [outgoing request](https://docs.icerpc.dev/icerpc/invocation/outgoing-request.md). This split makes the encoding of a response payload more convenient and efficient for the [Slice](https://docs.icerpc.dev/slice.md) generated code, but is otherwise unnecessary. An outgoing response payload is conceptually one continuous stream of bytes.
