Diffusion C API  5.9.24
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Sending and receiving messages as a client.

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

Function Documentation

void deregister_msg_listener ( SESSION_T session,
MSG_LISTENER_DEREGISTRATION_PARAMS_T  params 
)

Deregister a listener for a topic endpoint.

If the topic specified in the params has not been registered as a listener endpoint, then this function has no effect.

Parameters
sessionThe session handle. If NULL, this function returns immediately.
paramsParameters describing the listener to be deregistered.
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.

Control clients may send messages directly to a client (or a group of clients) via a topic endpoint. Registering a listener for that endpoint allows a client to receive these messages and have them be handled in a user-supplied function.

Specifying a NULL topic path is a special case that catches all messages that do not have an explicit listener registered for it.

Parameters
sessionThe session handle. If NULL, this function returns immediately.
paramsParameters defining the listener registration.
void send_msg ( SESSION_T session,
SEND_MSG_PARAMS_T  params 
)

Synchronously send a message to Diffusion via a topic endpoint.

Messages are sent for a particular topic path. The topic path acts as a context for the recipient which will see the message as having come 'from' the topic as opposed to the actual originator. A topic with the path need not exist on the server; if one does exist, it is unaffected by messaging.

The calling session must have the SEND_TO_CLIENT permission for the topic path.

Parameters
sessionThe session handle. If NULL, this function returns immediately.
paramsParameters defining the message to be sent.