mitchellh / libxev

libxev is a cross-platform, high-performance event loop that provides abstractions for non-blocking IO, timers, events, and more and works on Linux (io_uring or epoll), macOS (kqueue), and Wasm + WASI. Available as both a Zig and C API.
MIT License
2.07k stars 74 forks source link

Socket example using Antiphony #34

Closed RossComputerGuy closed 1 year ago

RossComputerGuy commented 1 year ago

I'm currently trying to use libxev to perform RPC calls in the background along with Antiphony. I tried looking at how libxev works and I cannot figure out how to create an event loop and have it handle Antiphony clients without blocking the main process.

mitchellh commented 1 year ago

I've never used antiphony so I'm not sure. If you can implement how antiphony sends/receives/connects then you'd just replace that with libxev calls. Antiphony would probably need some better async (in general, not Zig async keyword) support to support this, and since I haven't used it, I'm unsure how compatible it is.