Hop::FFI
Thin, one-to-one helpers over LibHop: turn raw pointers + synchronous sink callbacks into Crystal Bytes/String/arrays. Everything ergonomic lives in Hop::Endpoint.
Constants
Class methods
role: dialer/initiator = 0, acceptor = 1 (matches the other SDKs).
---- read C memory that is valid only during a call ----
The relay to dial right now, or nil when there is nothing dialable. nil with a non-zero
relay_pool total is the degraded "every candidate is backed off" state (wait and retry, this is
not offline); nil with a zero total is an empty pool. The 2 KiB buffer is far past any real
endpoint URL; the C call writes nothing and returns 0 if a URL would not fit.
{total pooled endpoints, how many are dialable right now}.
[{from32, request_id32, service, method, args}]
[{from32, for_request_id32, status, body}]