---
title: "answer · RUAL Documentation"
description: "Answers the socket method that is running: {method, payload, request_id}, or the error code in error. A RUAL realtime block in the socket group."
canonical: https://docs.rual.nl/block-types/realtime/socket_answer
language: en
---

# answer

This block is part of the [`realtime`](https://docs.rual.nl/block-types/realtime) group and was last modified in core [`v15.0.2`](https://docs.rual.nl/core-versions/150002).

Answers the socket method that is running: `{method, payload, request_id}`, or the error code in `error`.

- flow

- socket `socketconnection` Defaults to the socket of the run.

- payload `object`

- error `value` An error code, e.g. NOT_ENOUGH_PERMISSIONS.

- flow

- success `condition`

The .blueprint statement `answer BODY` / `answer error CODE [BODY]`. Writes the one answer of the running socket method: the method as the client spelled it, the request_id it sent, the payload (left out when empty, never null) and, when error is set, the error code. A run answers once; a second answer reports success=false. A method that ends without an answer sends nothing.

## Version history

Introduced in [`v15.0.2`](https://docs.rual.nl/core-versions/150002).

- [`v15.0.2`](https://docs.rual.nl/core-versions/150002): block added in this release.

- [Back to `realtime`](https://docs.rual.nl/block-types/realtime): Return to the main group to view all sub-groups

- [Back to `socket`](https://docs.rual.nl/block-types/realtime?group=socket): Return to the group to view all blocks within this group
