Webcom C SDK
Data Fields

#include <webcom-eli.h>

Data Fields

void(* on_connected )(wc_context_t *ctx)
 
int(* on_disconnected )(wc_context_t *ctx)
 
int(* on_error )(wc_context_t *ctx, unsigned next_try, const char *error, int error_len)
 
void(* on_auth_success )(wc_context_t *ctx, struct wc_auth_info *ai)
 
void(* on_auth_error )(wc_context_t *ctx, char *error)
 

Detailed Description

Callbacks to pass to the event loop integration. You can set one callback to NULL if you are not interested in the event.

Field Documentation

◆ on_auth_error

void(* wc_eli_callbacks::on_auth_error) (wc_context_t *ctx, char *error)

called on error reply from the authentication server

Parameters
ctx
error

◆ on_auth_success

void(* wc_eli_callbacks::on_auth_success) (wc_context_t *ctx, struct wc_auth_info *ai)

called on success reply from the authentication server

Parameters
ctxthe context
aia structure bearing the informations about the authentication

◆ on_connected

void(* wc_eli_callbacks::on_connected) (wc_context_t *ctx)

called when the connection to the server is up

Parameters
ctxthe context

◆ on_disconnected

int(* wc_eli_callbacks::on_disconnected) (wc_context_t *ctx)

called when the connection to the server is closed

Parameters
ctxthe context
errorNULL if no error occurred, an error string on error
Returns
return anything but 0 to let the SDK reconnect automatically

◆ on_error

int(* wc_eli_callbacks::on_error) (wc_context_t *ctx, unsigned next_try, const char *error, int error_len)

called when the connection to the server is close on error

Parameters
ctxthe context
next_trydelay, in seconds, before the next automatic reconnection attempt, 0 if no next attempt
errora string describing the error (may not be null terminated)
error_lenthe error string length
Returns
return anything but 0 to let the SDK reconnect automatically

The documentation for this struct was generated from the following file: