-
RILLING Louis authored
API changes: - input messages are now queued internally and not handed to the recv callback; - the input queue has a bounded size and new messages are silently dropped if the queue is full; - instead of being called for every input message, the recv callback is now called at most once per deadline and iff the queue was previously empty and now contains some messages, thus acting like an edge-triggered interrupt notifying that some messages are ready to be read; - the recv callback now takes no argument in native Rust, and only a user provided intptr_t argument in FFI API; - in FFI API vsg_init() takes the user-provided callback argument as additional argument; - two new non-blocking operations are provided: - Context::poll / vsg_poll() checks if the input queue contains some messages; - Context::recv / vsg_recv() picks the next message in the input queue, if available. Tests are adapted and completed to use the new API. Example send.cpp is completed to receive and display the message sent by the peer.
b6fed293