Expand description
Transport traits that protocols are written against.
Protocols are async and generic over these traits, so the same protocol code runs on
every backend: native serial, USB and Bluetooth stacks, and the browser’s Web Serial,
WebUSB, WebHID and Web Bluetooth APIs. Each trait describes one kind of link; a
protocol asks for exactly the kind it needs. See the
transport documents.
Traits§
- Byte
Stream - A byte stream: serial ports, USB-serial chips, Bluetooth classic RFCOMM, or a BLE GATT link that behaves like a serial line.
- Clock
- Time for protocols: native timers, the browser’s
setTimeout, or a virtual clock in tests. - Packet
Link - A packet link that keeps message boundaries: USB HID reports, USB bulk transfers or BLE characteristic writes and notifications.