TOOLKIT·ARCADE

Transport Layers

Understanding how Toolkit-P2P connects devices using Bluetooth, WiFi Direct, and hybrid transports.

Overview

Toolkit-P2P supports multiple transport layers to ensure your app works in any environment. Each transport has different characteristics, advantages, and limitations.

🔵 Bluetooth Low Energy

iOSAndroidAirplane Mode ✈️

Bluetooth LE is the most reliable transport for offline connectivity. It works in airplane mode and has excellent cross-platform support.

Characteristics

Range:~10 meters
Max Peers:8-10 devices
Bandwidth:~1 Mbps
Latency:20-50ms
Power Usage:Very Low

Best For

  • • Turn-based games
  • • Chat applications
  • • Small file transfers
  • • Battery-sensitive apps

Usage

<P2PProvider transport="bluetooth">
  <App />
</P2PProvider>

📡 WiFi Direct / Multipeer

iOS (Multipeer)Android (WiFi Direct)

WiFi Direct (Android) and Multipeer Connectivity (iOS) provide higher bandwidth and lower latency than Bluetooth, perfect for real-time gaming.

Characteristics

Range:~30-100 meters
Max Peers:20-30 devices
Bandwidth:~50-200 Mbps
Latency:10-30ms
Power Usage:Moderate

Best For

  • • Real-time multiplayer games
  • • Video/audio streaming
  • • Large file transfers
  • • High player count games

Usage

<P2PProvider transport="wifi">
  <App />
</P2PProvider>

⚡ Hybrid Transport

RecommendediOSAndroid

The hybrid transport automatically selects the best available connection method and can seamlessly switch between transports as conditions change.

How It Works

1. Discovery Phase

Starts with Bluetooth discovery (always available) and simultaneously checks for WiFi Direct/Multipeer availability.

2. Connection Selection

Prioritizes WiFi if available (faster), falls back to Bluetooth if not.

3. Automatic Failover

If WiFi connection drops, automatically switches to Bluetooth without disconnecting.

Usage

<P2PProvider transport="hybrid">
  <App />
</P2PProvider>

📊 Comparison

FeatureBluetooth LEWiFi DirectHybrid
Airplane Mode✓ Yes✗ No✓ Fallback
Low LatencyGoodExcellentExcellent
RangeShortLongLong
Battery LifeExcellentGoodGood
Setup ComplexitySimpleModerateAutomatic