type · Browser and Node

# MeshEvent

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

Import:

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

## Declaration

type:

```ts
type MeshEvent =
  | { type: "frame-out"; link: string; bytes: number; airtimeMs: number; summary: string }
  | { type: "frame-in"; link: string; bytes: number; rssi?: number; snr?: number; summary: string }
  | { type: "packet-in"; pid: string; kind: PacketKind; forMe: boolean }
  /** A packet built from a posted TSP message, before its first frame goes out. `wireBytes` is the TSP message's size. */
  | { type: "packet-out"; pid: string; kind: PacketKind; from: string; to: string; route: "direct" | "flood" | "gateway"; bytes: number; frames: number; wireBytes: number }
  | { type: "retry"; pid: string; round: number; missing: number[] }
  | { type: "delivered"; pid: string; to: string; route: "direct" | "flood" | "gateway" }
  | { type: "custody"; pid: string; gateway: string }
  | { type: "queued"; pid: string; reason: "no-route" | "no-airtime" | "no-answer" }
  | { type: "budget"; link: string; usedFraction: number; waitMs: number; warning?: string }
  | { type: "dropped"; reason: string };
```

[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/MeshEvent/. An index of the documentation for AI assistants is at https://toip.tools/llms.txt.
