Diffusion C API  5.9.24
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
svc-send-msg.h File Reference

Functions for sending messages to handlers in control clients via topic endpoints. More...

Data Structures

struct  svc_send_msg_response_s
 
struct  send_msg_params_s
 Structure supplied to a send_msg() call. More...
 
struct  msg_listener_registration_params_s
 Structure supplied when registering a message listener. More...
 
struct  msg_listener_deregistration_params_s
 Structure supplied when deregistering a message listener. More...
 

Macros

#define SEND_MSG_HANDLERS
 User-supplied handlers that may be invoked in response to a send_msg() call.
 

Typedefs

typedef int(* on_send_msg_cb )(SESSION_T *session, void *context)
 Callback for send_msg() More...
 
typedef int(* on_msg_cb )(SESSION_T *session, SVC_SEND_MSG_REQUEST_T *request)
 User-supplied function which receives messages directed to the session via a topic endpoint. More...
 
typedef struct send_msg_params_s SEND_MSG_PARAMS_T
 Structure supplied to a send_msg() call.
 
typedef struct
msg_listener_registration_params_s 
MSG_LISTENER_REGISTRATION_PARAMS_T
 Structure supplied when registering a message listener.
 
typedef struct
msg_listener_deregistration_params_s 
MSG_LISTENER_DEREGISTRATION_PARAMS_T
 Structure supplied when deregistering a message listener.
 

Functions

void send_msg (SESSION_T *session, SEND_MSG_PARAMS_T params)
 Synchronously send a message to Diffusion via a topic endpoint. More...
 
void register_msg_listener (SESSION_T *session, MSG_LISTENER_REGISTRATION_PARAMS_T params)
 Register to accept messages (not topic updates) that are sent to this session via a topic endpoint. More...
 
void deregister_msg_listener (SESSION_T *session, MSG_LISTENER_DEREGISTRATION_PARAMS_T params)
 Deregister a listener for a topic endpoint. More...
 

Detailed Description

Functions for sending messages to handlers in control clients via topic endpoints.

Typedef Documentation

typedef int(* on_msg_cb)(SESSION_T *session, SVC_SEND_MSG_REQUEST_T *request)

User-supplied function which receives messages directed to the session via a topic endpoint.

Parameters
sessionThe current active session.
requestA structure containing the incoming message.
Returns
HANDLER_SUCCESS or HANDLER_FAILURE.
typedef int(* on_send_msg_cb)(SESSION_T *session, void *context)

Callback for send_msg()

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