Closed arichadda closed 8 months ago
Thank for your contribution.
I think we didn't had any accessor for userdata because you could always pass it with another way (e.g. pass a tuple (client, userdata) instead of just client). But I agree it could make some usage easier and don't incur additional maintenance work.
Adding a getter method for
userdata
for the case of accessing the data outside of a callback. I found this useful when writing unit tests for publish/subscribe events.Please let me know if there's a reason a getter method was not included in the original codebase. Thanks for supporting this project!
Signed-off-by: arichadda ari.chadda@gmail.com