Data Structures | |
| struct | svc_send_receiver_client_request_s |
| Structure containing the information received and passed to a handler registered on a message path, including the message content. More... | |
| struct | msg_receiver_registration_params_s |
| Structure supplied when issuing a register_msg_handler() call. More... | |
| struct | send_request_to_session_params_s |
| Structure supplied when issuing a send_request_to_session() call. More... | |
| struct | diffusion_request_handler_s |
| Request handler structure required when creating an ADD_REQUEST_HANDLER_PARAMS_T More... | |
| struct | add_request_handler_params_s |
| Structure supplied when issuing a add_request_handler() call. More... | |
| struct | send_request_to_filter_params_s |
| Structure supplied when issuing a send_request_to_filter() call. More... | |
| struct | send_request_params_s |
| Structure supplied to a send_request() call. More... | |
| struct | diffusion_request_stream_s |
| Structure supplied when adding a request stream. More... | |
Macros | |
| #define | MSG_RECEIVER_REGISTRATION_HANDLERS |
| Handlers for notification of registration of handler and message receipt. | |
Typedefs | |
| typedef struct DIFFUSION_REQUEST_CONTEXT_T | DIFFUSION_REQUEST_CONTEXT_T |
| Context information of the request received. | |
| typedef struct svc_send_receiver_client_request_s | SVC_SEND_RECEIVER_CLIENT_REQUEST_T |
| Structure containing the information received and passed to a handler registered on a message path, including the message content. | |
| typedef int(* | on_msg_receiver_registration_cb) (SESSION_T *session, void *context) |
| Callback when a handler is registered with the server. | |
| typedef int(* | on_send_receiver_client_msg_cb) (SESSION_T *session, const SVC_SEND_RECEIVER_CLIENT_REQUEST_T *request, void *context) |
| Callback when a message is received by a registered handler on a message path. | |
| typedef struct msg_receiver_registration_params_s | MSG_RECEIVER_REGISTRATION_PARAMS_T |
| Structure supplied when issuing a register_msg_handler() call. | |
| typedef int(* | request_on_response_cb) (DIFFUSION_DATATYPE response_datatype, const DIFFUSION_VALUE_T *response, void *context) |
| Callback when a response to a request is received. | |
| typedef struct send_request_to_session_params_s | SEND_REQUEST_TO_SESSION_PARAMS_T |
| Structure supplied when issuing a send_request_to_session() call. | |
| typedef int(* | request_handler_on_request) (SESSION_T *session, DIFFUSION_DATATYPE request_datatype, const DIFFUSION_VALUE_T *request, const DIFFUSION_REQUEST_CONTEXT_T *request_context, const DIFFUSION_RESPONDER_HANDLE_T *handle, void *context) |
| Callback when a request to a request handler has been received. | |
| typedef int(* | request_handler_on_active) (SESSION_T *session, const char *path, const DIFFUSION_REGISTRATION_T *registered_handler) |
| Callback when a request handler is active. | |
| typedef void(* | request_handler_on_close) (void) |
| Callback when a request handler is closed. | |
| typedef int(* | request_handler_on_error) (const DIFFUSION_ERROR_T *error) |
| Callback when a request handler has encountered an error. | |
| typedef struct diffusion_request_handler_s | DIFFUSION_REQUEST_HANDLER_T |
| Request handler structure required when creating an ADD_REQUEST_HANDLER_PARAMS_T | |
| typedef struct add_request_handler_params_s | ADD_REQUEST_HANDLER_PARAMS_T |
| Structure supplied when issuing a add_request_handler() call. | |
| typedef int(* | filtered_request_number_sent) (int number_sent, void *context) |
| Callback when a filtered request has been dispatched to a number of sessions. | |
| typedef int(* | filtered_request_on_response) (DIFFUSION_DATATYPE response_datatype, const DIFFUSION_VALUE_T *response, void *context) |
| Callback when a response to a filtered request has been received. | |
| typedef int(* | filtered_request_on_response_error) (const SESSION_ID_T *session_id, const DIFFUSION_ERROR_T *error) |
| Callback when a response results in an error. | |
| typedef struct send_request_to_filter_params_s | SEND_REQUEST_TO_FILTER_PARAMS_T |
| Structure supplied when issuing a send_request_to_filter() call. | |
| typedef struct send_request_params_s | SEND_REQUEST_PARAMS_T |
| Structure supplied to a send_request() call. | |
| typedef int(* | request_stream_on_request_cb) (SESSION_T *session, const char *path, DIFFUSION_DATATYPE request_datatype, const DIFFUSION_VALUE_T *request, const DIFFUSION_RESPONDER_HANDLE_T *responder_handle, void *context) |
| Callback for a request stream when a request has been received. | |
| typedef int(* | request_stream_on_error_cb) (const DIFFUSION_ERROR_T *error) |
| Callback when a request stream encounters an error. | |
| typedef void(* | request_stream_on_close_cb) (void) |
| Callback for a request stream that has been closed. | |
| typedef struct diffusion_request_stream_s | DIFFUSION_REQUEST_STREAM_T |
| Structure supplied when adding a request stream. | |
Functions | |
| SESSION_ID_T * | diffusion_request_context_get_session_id (const DIFFUSION_REQUEST_CONTEXT_T *request_context) |
| Return a copy of the request context's session ID. | |
| char * | diffusion_request_context_get_path (const DIFFUSION_REQUEST_CONTEXT_T *request_context) |
| Return a copy of the request context's request path. | |
| HASH_T * | diffusion_request_context_get_session_properties (const DIFFUSION_REQUEST_CONTEXT_T *request_context) |
| Return a copy of the request context's session properties. | |
| void | send_request_to_session (SESSION_T *session, SEND_REQUEST_TO_SESSION_PARAMS_T params) |
| Send a request to a specific session. | |
| void | send_request_to_filter (SESSION_T *session, SEND_REQUEST_TO_FILTER_PARAMS_T params) |
| Send a request via a filter. | |
| void | add_request_handler (SESSION_T *session, ADD_REQUEST_HANDLER_PARAMS_T params) |
| Add a server registered request handler. | |
| void | send_request (SESSION_T *session, SEND_REQUEST_PARAMS_T params) |
| Send a request to a path. | |
| DIFFUSION_REQUEST_STREAM_T * | set_request_stream (SESSION_T *session, const char *path, DIFFUSION_DATATYPE request_datatype, DIFFUSION_DATATYPE response_datatype, const DIFFUSION_REQUEST_STREAM_T *request_stream) |
| Set a request stream to handle requests to a specified path. | |
| DIFFUSION_REQUEST_STREAM_T * | remove_request_stream (SESSION_T *session, const char *request_path) |
| Remove a request stream bound to a specified path. | |
| typedef struct DIFFUSION_REQUEST_CONTEXT_T DIFFUSION_REQUEST_CONTEXT_T |
Context information of the request received.
Request path, session ID and session properties
| typedef int(* filtered_request_number_sent) (int number_sent, void *context) |
Callback when a filtered request has been dispatched to a number of sessions.
| number_sent | The number of requests sent to sessions. |
| context | User supplied context passed in from SEND_REQUEST_TO_FILTER_PARAMS_T. |
| typedef int(* filtered_request_on_response) (DIFFUSION_DATATYPE response_datatype, const DIFFUSION_VALUE_T *response, void *context) |
Callback when a response to a filtered request has been received.
| response_datatype | Datatype of the response. |
| response | Response as a DIFFUSION_VALUE_T. |
| context | User supplied context passed in from SEND_REQUEST_TO_FILTER_PARAMS_T. |
| typedef int(* filtered_request_on_response_error) (const SESSION_ID_T *session_id, const DIFFUSION_ERROR_T *error) |
Callback when a response results in an error.
| session_id | The session id of the session which responded with an error. |
| error | The response error. The context will be the user supplied context passed in from SEND_REQUEST_TO_FILTER_PARAMS_T. |
| typedef int(* on_msg_receiver_registration_cb) (SESSION_T *session, void *context) |
Callback when a handler is registered with the server.
| session | The currently active session. |
| context | User-supplied context from the initial register_msg_handler() call. |
| typedef int(* on_send_receiver_client_msg_cb) (SESSION_T *session, const SVC_SEND_RECEIVER_CLIENT_REQUEST_T *request, void *context) |
Callback when a message is received by a registered handler on a message path.
| session | The currently active session. |
| request | Details about the incoming message, and the message itself. |
| context | User-supplied context from the initial register_msg_handler() call. |
| typedef int(* request_handler_on_active) (SESSION_T *session, const char *path, const DIFFUSION_REGISTRATION_T *registered_handler) |
Callback when a request handler is active.
| session | The currently active session. |
| path | The path request handler is bound to. |
| registered_handler | The registered handler |
| typedef int(* request_handler_on_error) (const DIFFUSION_ERROR_T *error) |
Callback when a request handler has encountered an error.
| error | The received error. |
| typedef int(* request_handler_on_request) (SESSION_T *session, DIFFUSION_DATATYPE request_datatype, const DIFFUSION_VALUE_T *request, const DIFFUSION_REQUEST_CONTEXT_T *request_context, const DIFFUSION_RESPONDER_HANDLE_T *handle, void *context) |
Callback when a request to a request handler has been received.
| session | The currently active session. |
| request_datatype | The request datatype. |
| request | The request. |
| request_context | The request context. |
| handle | The responder handle. Used when a response is dispatched with respond_to_request. |
| context | User supplied context. |
| typedef int(* request_on_response_cb) (DIFFUSION_DATATYPE response_datatype, const DIFFUSION_VALUE_T *response, void *context) |
Callback when a response to a request is received.
| response_datatype | Datatype of the response. |
| response | Response as a DIFFUSION_VALUE_T. |
| context | User supplied context passed in from SEND_REQUEST_TO_SESSION_PARAMS_T. |
| typedef int(* request_stream_on_error_cb) (const DIFFUSION_ERROR_T *error) |
Callback when a request stream encounters an error.
| error | The error received on the request stream. |
| typedef int(* request_stream_on_request_cb) (SESSION_T *session, const char *path, DIFFUSION_DATATYPE request_datatype, const DIFFUSION_VALUE_T *request, const DIFFUSION_RESPONDER_HANDLE_T *responder_handle, void *context) |
Callback for a request stream when a request has been received.
| session | The session. |
| path | Path the request was received on. |
| request_datatype | The request's datatype. |
| request | The request. |
| responder_handle | The responder handle used when dispatching a response with respond_to_request. If the responder handle is required outside the scope of this function, use responder_handle_dup to copy it and use where necessary. This can be freed with responder_handle_free. |
| context | User supplied context passed in from the request stream. |
| void send_request_to_filter | ( | SESSION_T * | session, |
| SEND_REQUEST_TO_FILTER_PARAMS_T | params ) |
Send a request via a filter.
| session | The session handle. If NULL, this function returns immediately. |
| params | Parameters defining the request to send a request via a filter. |