push_service_set_connection_close_callback()

Call this function to register a connection closed callback.

Synopsis:

#include <bbpush/push_service.h>
 
int push_service_set_connection_close_callback(push_service_t *ps, push_connection_close_callback_t cb_func)

Since:

BlackBerry 10.2.0

Arguments:

ps

A pointer to the push_service_t structure whose connection close callback you want to set.

cb_func

The callback that will be called when the connection to the PNS Agent is closed.

Library:

libPushService

Description:

When the connection to the PNS Agent is lost, the application or service needs to re-establish the connection with the PNS Agent by calling push_service_get_fd() periodically until push_service_get_fd() returns a valid file descriptor.

Returns:

PUSH_SUCCESS upon success, PUSH_FAILURE with errno set otherwise.

Last modified: 2013-12-21

comments powered by Disqus