9.8 KiB
9.8 KiB
@suaveplan/bitpacker-network - Bitpacker network plugin
Summary
Network simulation utilities for testing bitpacker under realistic network conditions.
Documentation tree
- defaults — (no submodules)
- default-clock —
defaultClockis the single allow-listed wall-clock source in@suaveplan/bitpacker-network. The determin… - default-rng —
defaultRngis the canonical CSPRNG-backedRngfactory used byNetworkSimulatorand any other deterministic-when-a… - defaults — (no submodules)
- default-clock —
- otel — (no submodules)
- instruments — (no submodules)
- register-schemas — Idempotent integration with
@suaveplan/schema-registryfor the@suaveplan/bitpacker-networkpackage. Exposes `regis…- register-schemas — Idempotent integration with
@suaveplan/schema-registryfor the@suaveplan/bitpacker-networkpackage. Exposes `regis…
- register-schemas — Idempotent integration with
- simulator — (no submodules) - simulator.schema — Zod schema for `NetworkSimulator…
- simulator — (no submodules) - simulator.schema — Zod schema for `NetworkSimulator…
- simulator.schema — Zod schema for
NetworkSimulatorConstructorOptions, the constructor bundle forNetworkSimulatorand `createNetworkSi…
- types — (no submodules) - types.schema — Zod schema for `NetworkSimulationOpt…
- types — (no submodules) - types.schema — Zod schema for `NetworkSimulationOpt…
- types.schema — Zod schema for
NetworkSimulationOptions, the configuration accepted byNetworkSimulator's constructor and `setOptio…
- index — Path:
bitpacker-network/src/index.tsExport: See source for details.
- default-rng —
defaultRngis the canonical CSPRNG-backedRngfactory used byNetworkSimulatorand any other deterministic-when-a… - defaults — (no submodules)- otel — (no submodules)- instruments — (no submodules)- simulator — (no submodules)- simulator.schema — Zod schema for `NetworkSimulator…
- simulator — (no submodules)- simulator.schema — Zod schema for `NetworkSimulator…
- simulator.schema — Zod schema for
NetworkSimulatorConstructorOptions, the constructor bundle forNetworkSimulatorand `createNetworkSi… - types — (no submodules)- types.schema — Zod schema for `NetworkSimulationOpt…
- types — (no submodules)- types.schema — Zod schema for `NetworkSimulationOpt…
- types.schema — Zod schema for
NetworkSimulationOptions, the configuration accepted byNetworkSimulator's constructor and `setOptio…
- index — Path:
bitpacker-network/src/index.tsExport: See source for details. - register-schemas — Idempotent integration with
@suaveplan/schema-registryfor the@suaveplan/bitpacker-networkpackage. Exposes `regis… - default-clock —
defaultClockis the single allow-listed wall-clock source in@suaveplan/bitpacker-network. The determin… - default-rng —
defaultRngis the canonical CSPRNG-backedRngfactory used byNetworkSimulatorand any other deterministic-when-a… - defaults — (no submodules)- otel — (no submodules)- instruments — (no submodules)- simulator — (no submodules)- simulator.schema — Zod schema for `NetworkSimulator…
- simulator — (no submodules)- simulator.schema — Zod schema for `NetworkSimulator…
- simulator.schema — Zod schema for
NetworkSimulatorConstructorOptions, the constructor bundle forNetworkSimulatorand `createNetworkSi…
- types — (no submodules)- types.schema — Zod schema for `NetworkSimulationOpt…
- types — (no submodules)- types.schema — Zod schema for `NetworkSimulationOpt…
- types.schema — Zod schema for
NetworkSimulationOptions, the configuration accepted byNetworkSimulator's constructor and `setOptio…
- index — Path:
bitpacker-network/src/index.tsExport: See source for details. - register-schemas — Idempotent integration with
@suaveplan/schema-registryfor the@suaveplan/bitpacker-networkpackage. Exposes `regis… - default-clock —
defaultClockis the single allow-listed wall-clock source in@suaveplan/bitpacker-network. The determin… - default-rng —
defaultRngis the canonical CSPRNG-backedRngfactory used byNetworkSimulatorand any other deterministic-when-a… - defaults — (no submodules)- otel — (no submodules)- instruments — (no submodules)- simulator — (no submodules)- simulator.schema — Zod schema for `NetworkSimulator…
- simulator — (no submodules)- simulator.schema — Zod schema for `NetworkSimulator…
- simulator.schema — Zod schema for
NetworkSimulatorConstructorOptions, the constructor bundle forNetworkSimulatorand `createNetworkSi…
- types — (no submodules)- types.schema — Zod schema for `NetworkSimulationOpt…
- types — (no submodules)- types.schema — Zod schema for `NetworkSimulationOpt…
- types.schema — Zod schema for
NetworkSimulationOptions, the configuration accepted byNetworkSimulator's constructor and `setOptio…
- index — Path:
bitpacker-network/src/index.tsExport: See source for details. - register-schemas — Idempotent integration with
@suaveplan/schema-registryfor the@suaveplan/bitpacker-networkpackage. Exposes `regis… - default-clock —
defaultClockis the single allow-listed wall-clock source in@suaveplan/bitpacker-network. The determin… - default-rng —
defaultRngis the canonical CSPRNG-backedRngfactory used byNetworkSimulatorand any other deterministic-when-a… - defaults — (no submodules)- otel — (no submodules) - instruments — (no submodules)- simulator — (no submodules) - simulator — (no submodules) - simulator.schema — Zod schema for
NetworkSimulatorConstructorOptions, the constructor bundle forNetworkSimulatorand `createNetworkSi… - types — (no submodules) - types — (no submodules) - types.schema — Zod schema for
NetworkSimulationOptions, the configuration accepted byNetworkSimulator's constructor and `setOptio… - index — Path:
bitpacker-network/src/index.tsExport: See source for details. - register-schemas — Idempotent integration with
@suaveplan/schema-registryfor the@suaveplan/bitpacker-networkpackage. Exposes `regis…
Install
bun add @suaveplan/bitpacker-network
Usage
import { NetworkSimulator } from "@suaveplan/bitpacker-network";
const sim = new NetworkSimulator({ latency: 50, jitter: 10, packetLoss: 0.02 });
sim.send(new Uint8Array([1, 2, 3]));
const received = sim.receive(); // may drop packet based on loss rate
Modules
src/index.ts—NetworkSimulator: configurable latency, jitter, and packet loss simulation