Diffusion C API  6.7.4
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
pings.h File Reference

Pings feature. More...

Data Structures

struct  svc_ping_system_request_s
 Structure of a system ping request. More...
 
struct  svc_ping_user_request_s
 Structure of a user ping request. More...
 
struct  ping_system_handlers_s
 
struct  ping_system_params_s
 Structure supplied when registering a system ping handler or sending a system ping request. More...
 
struct  ping_user_handlers_s
 
struct  ping_user_params_s
 Structure supplied when registering a user ping handler or sending a user ping request. More...
 

Macros

#define PING_SYSTEM_HANDLERS
 Callback handlers that can be registered for dealing with system ping responses.
 
#define PING_USER_HANDLERS
 Callback handlers that can be registered for dealing with user ping responses.
 

Typedefs

typedef struct
svc_ping_system_request_s 
SVC_PING_SYSTEM_REQUEST_T
 Structure of a system ping request.
 
typedef struct
svc_ping_user_request_s 
SVC_PING_USER_REQUEST_T
 Structure of a user ping request.
 
typedef int(* on_ping_system_request_cb )(SESSION_T *session, const SVC_PING_SYSTEM_REQUEST_T *request, void *context)
 Callback for ping_system_register_handler(). More...
 
typedef int(* on_ping_system_response_cb )(SESSION_T *session, void *context)
 Callback for ping_system(). More...
 
typedef struct ping_system_params_s PING_SYSTEM_PARAMS_T
 Structure supplied when registering a system ping handler or sending a system ping request.
 
typedef int(* on_ping_user_request_cb )(SESSION_T *session, const SVC_PING_USER_REQUEST_T *request, void *context)
 Callback for ping_user_register_handler(). More...
 
typedef int(* on_ping_user_response_cb )(SESSION_T *session, void *context)
 Callback for ping_user(). More...
 
typedef struct ping_user_params_s PING_USER_PARAMS_T
 Structure supplied when registering a user ping handler or sending a user ping request.
 

Functions

void ping_system_register_handler (SESSION_T *session, const PING_SYSTEM_PARAMS_T params)
 Register a user-defined handler for system pings. More...
 
void ping_user_register_handler (SESSION_T *session, const PING_USER_PARAMS_T params)
 Register a user-defined handler for user pings. More...
 
void ping_user (SESSION_T *session, const PING_USER_PARAMS_T params)
 Explicitly send a user ping to Diffusion. More...
 

Detailed Description

Pings feature.

Typedef Documentation

typedef int(* on_ping_system_request_cb)(SESSION_T *session, const SVC_PING_SYSTEM_REQUEST_T *request, void *context)

Callback for ping_system_register_handler().

Parameters
sessionThe current active session.
requestThe incoming ping request.
contextUser-supplied context from the initial registration call.
Returns
HANDLER_SUCCESS or HANDLER_FAILURE.
typedef int(* on_ping_system_response_cb)(SESSION_T *session, void *context)

Callback for ping_system().

Parameters
sessionThe current active session.
contextUser-supplied context from the initial registration call.
Returns
HANDLER_SUCCESS or HANDLER_FAILURE.
typedef int(* on_ping_user_request_cb)(SESSION_T *session, const SVC_PING_USER_REQUEST_T *request, void *context)

Callback for ping_user_register_handler().

Parameters
sessionThe current active session.
requestThe incoming ping request.
contextUser-supplied context from the initial registration call.
Returns
HANDLER_SUCCESS or HANDLER_FAILURE.
typedef int(* on_ping_user_response_cb)(SESSION_T *session, void *context)

Callback for ping_user().

Parameters
sessionThe current active session.
contextUser-supplied context from the initial registration call.
Returns
HANDLER_SUCCESS or HANDLER_FAILURE.