## nng_msg_header

Return message header.

### Synopsis

```c
#include <nng/nng.h>

void *nng_msg_header(nng_msg *msg);
```

### Description

The `nng_msg_header` function returns a pointer to the start of the header
content of the message _msg_.

NOTE: The message header contains protocol-specific header content.
Most applications should not access this content, but it is available for xref:../socket/raw.adoc[raw mode] sockets.
Specifcially applications should not attempt to store their own private data in the message header.

NOTE: The value returned by this is invalidated by a call to any of the functions that modify the message or the header content.

### Return Values

Pointer to start of message header.

### See Also

xref:nng_msg_body.adoc[nng_msg_body],
xref:nng_msg_header_append.adoc[nng_msg_header_append],
xref:nng_msg_header_chop.adoc[nng_msg_header_chop],
xref:nng_msg_header_insert.adoc[nng_msg_header_insert]
xref:nng_msg_header_len.adoc[nng_msg_header_len],
xref:nng_msg_header_trim.adoc[nng_msg_header_trim]
