Webcom C SDK
|
wc_datasync_context_t * | wc_datasync_init (wc_context_t *ctx) |
int | wc_datasync_keepalive (wc_context_t *ctx) |
void | wc_datasync_connect (wc_context_t *ctx) |
void | wc_datasync_close_cnx (wc_context_t *ctx) |
void wc_datasync_close_cnx | ( | wc_context_t * | ctx | ) |
Gracefully closes the connection to the Webcom datasync server.
ctx | the context |
void wc_datasync_connect | ( | wc_context_t * | ctx | ) |
Connects or reconnects a disconnected Webcom context
This function tries to (re)establish a connection to a Webcom server for a context whose connection is disconnected. This is the case when the following Webcom events have been dispatched to the user callback:
ctx | the context |
wc_datasync_context_t* wc_datasync_init | ( | wc_context_t * | ctx | ) |
initializes the datasync service for a Webcom context
This function must be have been called once before performing any datasync related operation. Note that wc_datasync_connect() will call this function before trying to connect to the server, if it had not been called already.
ctx | the Webcom context |
int wc_datasync_keepalive | ( | wc_context_t * | ctx | ) |
Function that keeps the connection to the webcom server alive.
The server will singlehandledly close the connection if there is no activity from the client in the last 60 seconds. Call this function periodically to avoid this.
ctx | the context |