clasp-transport

Crates.ioclasp-transport
lib.rsclasp-transport
version3.1.0
created_at2026-01-16 04:32:58.813578+00
updated_at2026-01-25 07:22:49.661935+00
descriptionTransport layer implementations for CLASP
homepagehttps://clasp.to
repositoryhttps://github.com/lumencanvas/clasp
max_upload_size
id2047899
size253,150
Moheeb Zara (virgilvox)

documentation

README

clasp-transport

Transport layer implementations for CLASP (Creative Low-Latency Application Streaming Protocol).

Supported Transports

Transport Feature Flag Description
WebSocket websocket (default) Primary transport for browser and server communication
QUIC quic Low-latency UDP-based transport with TLS 1.3
TCP tcp Reliable streaming transport
UDP udp Lightweight datagram transport for LAN
WebRTC webrtc P2P data channels with NAT traversal
BLE ble Bluetooth Low Energy GATT service
Serial serial Hardware serial port communication

Usage

use clasp_transport::WebSocketTransport;

#[tokio::main]
async fn main() -> anyhow::Result<()> {
    let transport = WebSocketTransport::connect("ws://localhost:7330").await?;

    // Send messages
    transport.send(message).await?;

    // Receive messages
    while let Some(msg) = transport.recv().await {
        println!("Received: {:?}", msg);
    }

    Ok(())
}

Features

  • Async/await with Tokio
  • Automatic frame encoding/decoding
  • Connection health monitoring
  • TLS support

Documentation

Visit clasp.to for full documentation.

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.


Maintained by LumenCanvas | 2026

Commit count: 79

cargo fmt