mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-06-28 04:19:29 +00:00
Convert the kernel_api operations — relay/filter/lightpush/store,
peer_manager, discovery, ping, debug/node-info — to typed {.ffi.} procs that
pass parameters directly and ride generic CBOR (no per-op request wrappers).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
8 lines
277 B
Nim
8 lines
277 B
Nim
proc ping_peer*(
|
|
self: LogosDelivery, peerAddr: string, timeoutMs: int
|
|
): Future[Result[string, string]] {.ffi.} =
|
|
## Returns the round-trip time in nanoseconds.
|
|
let rtt = (await self.waku.pingPeer(peerAddr, timeoutMs)).valueOr:
|
|
return err(error)
|
|
return ok($rtt)
|