function · Browser and Node

# encodePacket

`@toip-tools/mesh-transport` · [View source](https://github.com/yourbuddyconner/toip-tools/blob/main/packages/mesh-transport/src/packet.ts#L28)

Import:

```ts
import { encodePacket } from "@toip-tools/mesh-transport";
```

## Declaration

Signature:

```ts
encodePacket(p: Packet): Uint8Array;
```

### Parameters

- **`p` (required)**: `Packet`

### Returns

`Uint8Array<ArrayBufferLike>`

[Usage guide](https://toip.tools/toolkit/mesh-transport/#usage) · [Error handling](https://toip.tools/toolkit/mesh-transport/#errors) · [All exports](https://toip.tools/toolkit/mesh-transport/api/)

---

This is the Markdown version of https://toip.tools/toolkit/mesh-transport/api/encodePacket/. An index of the documentation for AI assistants is at https://toip.tools/llms.txt.
