Diffusion C API 6.11.5
Loading...
Searching...
No Matches
pings.h File Reference

Allows pinging the Diffusion server and other sessions. 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().
 
typedef int(* on_ping_system_response_cb) (SESSION_T *session, void *context)
 Callback for ping_system().
 
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().
 
typedef int(* on_ping_user_response_cb) (SESSION_T *session, void *context)
 Callback for ping_user().
 
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.
 

Detailed Description

Allows pinging the Diffusion server and other sessions.

Typedef Documentation

◆ on_ping_system_request_cb

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.

◆ on_ping_system_response_cb

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.

◆ on_ping_user_request_cb

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.

◆ on_ping_user_response_cb

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.