Jump to content

How to clear a callback in syncker


photo

Recommended Posts

Hello, in the IG syncker , it's possible to set a callback for specific messages with user defined "channel" with

ig->getSynckerMaster()->setMessageReceivedCallback(channel, callback)

But I couldn't find in the documentation a way to "clear" this callback.

Is it guaranteed to be safe to call this with a nullptr to clear the callback? Or should I proceed otherwise. Could/should a clear method be added?

Link to comment

Hello! yes you can use

ig->getSynckerMaster()->setMessageReceivedCallback(channel, nullptr);

it is safe.

we'll add a note to the documentation. next release we will add a more explicit unsubscribe in API

  • Thanks 1
Link to comment
×
×
  • Create New...