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

# nng\_msg\_clear(3)

clear message body content

## NAME

nng\_msg\_clear - clear message body content

## SYNOPSIS

```
#include <nng/nng.h>
void nng_msg_clear(nng_msg *msg);
```

## DESCRIPTION

The `nng_msg_clear()` function resets the body length of *msg* to zero.

## RETURN VALUES

None.

## ERRORS

None.

## SEE ALSO

[nng\_msg(5)](/nng_msg/5.md), [nng(7)](/nng/7.md)
