Add ability to handle events that expect an ack
This adds three new methods to the API surface
-
[Raw]Client::ack(AckId, D) -
ClientBuilder::on_with_ack(Event, callback) -
ClientBuilder::on_any_with_ack(Event, callback)
using these it's possible to receive messages that require ack and acknowledge them
Fixes #461
I didn't add any tests because I didn't have the time to do it yet. But I've tested locally with my usecase and it seems to work
suggestion: add tests so the feature continues to be tested and working
I could not figure out how to run the test-all recipe of the makefile, hence I didn't write any tests. I think docs could be improved on this in a later PR. For now can you tell me how I can run the tests?
suggestion: add tests so the feature continues to be tested and working
I could not figure out how to run the
test-allrecipe of the makefile, hence I didn't write any tests. I think docs could be improved on this in a later PR. For now can you tell me how I can run the tests?
agreed, that target is a little lacking. You need to start up the test containers beforehand as seen in the ci: https://github.com/1c3t3a/rust-socketio/blob/2ef32ecbe053d100e350c4d77a71dd1cab19471e/.github/workflows/test.yml#L36C11-L37C133, speaking of which I'll turn that on for you (it'll run on every push if you can't get it running locally)
Wtf github? I didn't close this :thinking: maybe it got confused when I was syncing my fork
I have removed the ack id commit and will make a separate PR for it later. I've run the test-all tests locally and it all passes. I also made a small modification to the makefile so that I could run the tests multiple times
@1c3t3a I saw this in passing & it looks like a review would be appreciated