function · Browser and Node

# maxBytesUnder

The largest payload (up to 255 bytes) whose airtime is at most `ms`. 0 when even one byte is too long.

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

Import:

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

## Declaration

Signature:

```ts
maxBytesUnder(ms: number, s: LoRaSetting): number;
```

### Parameters

- **`ms` (required)**: `number`
- **`s` (required)**: `LoRaSetting`

### Returns

`number`

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