---
name: "nng_aio_set_msg"
section: "3"
platform: "linux"
package: "libnng-dev"
version: "1.10.1-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/nng_aio_set_msg"
---

# nng\_aio\_set\_msg(3)

set message for asynchronous send

## NAME

nng\_aio\_set\_msg - set message for asynchronous send

## SYNOPSIS

```
#include <nng/nng.h>
void nng_aio_set_msg(nng_aio *aio, nng_msg *msg);
```

## DESCRIPTION

The `nng_aio_set_msg()` function sets the message that will be used for an asynchronous send operation (see `nng_send_aio()`).

**Important**\

The `nng_aio` must not have an operation in progress.

## RETURN VALUES

None.

## ERRORS

None.

## SEE ALSO

[nng\_aio\_get\_msg(3)](/nng_aio_get_msg/3.md), [nng\_send\_aio(3)](/nng_send_aio/3.md), [nng\_aio(5)](/nng_aio/5.md), [nng\_msg(5)](/nng_msg/5.md), [nng(7)](/nng/7.md)
