Skip to main content

Module platform

Module platform 

Source
Expand description

The platform abstraction seam: the engine is written against Host; a concrete implementation (std, Android/Kotlin, iOS/Swift, embedded) only provides ~15 primitives. Transports are non-blocking (Host::tcp_recv returns Error::WouldBlock, tcp_send may take a partial prefix), so one engine drives hundreds of peers from a single thread.

Enums§

LogLevel
Log severity.
NetAddr
A network endpoint. Compact, Copy, comparable — suitable as map keys.

Traits§

Host
The platform seam. Implementations must be cheap and must not block longer than necessary.

Type Aliases§

ConnId
Opaque handle to an open TCP connection.
DiskId
Opaque handle to an open file/backing store.