omniClientJoinChannel

Defined in OmniClient.h

OmniClientRequestId omniClientJoinChannel(char const *url, void *userData, OmniClientJoinChannelCallback callback)

Start listening to a channel.

This also creates the channel, if it doesn’t already exist. The callback might be called more than once. The content buffer is normally freed after the callback returns. To prevent this, “take” the content buffer by clearing it to 0 inside the callback (after copying it somewhere else, of course). You are then responsible for calling content->free(content->buffer) when you’re finished with it

Note

If this function is called after omniClientShutdown, kInvalidRequestId will be returned, and the callback will not be called.