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

Functions relating to a session and session management. More...

Functions

SESSION_Tsession_create (const char *url_str, const char *principal, CREDENTIALS_T *credentials, SESSION_LISTENER_T *listener, RECONNECTION_STRATEGY_T *reconnection_strategy, DIFFUSION_ERROR_T *error)
 Create a new session and synchronously open a connection to the Diffusion server at the endpoint specified by the URL. More...
 
SESSION_Tsession_create_async (const char *url_str, const char *principal, CREDENTIALS_T *credentials, SESSION_LISTENER_T *listener, RECONNECTION_STRATEGY_T *reconnection_strategy, SESSION_CREATE_CALLBACK_T *callbacks, DIFFUSION_ERROR_T *error)
 Create a new session, but do not wait for the connection handshake to be performed. More...
 
void session_free (SESSION_T *session)
 Free memory associated with a session. More...
 
int session_start (SESSION_T *session, DIFFUSION_ERROR_T *error)
 Start a session, ie begin accepting messages from a Diffusion server. More...
 
int session_close (SESSION_T *session, DIFFUSION_ERROR_T *error)
 Stop accepting messages from a Diffusion server and close the connection. More...
 
SESSION_STATE_T session_state_get (SESSION_T *session)
 Returns the current session state. More...
 
CONNECTION_RESPONSE_CODE_T session_connection_response_code (SESSION_T *session)
 Returns the last connection response code. More...
 
const char * session_state_as_string (const SESSION_STATE_T state)
 Returns a human-readable representation of the session state. More...
 
int session_is_connected (const SESSION_T *session)
 Determines if a session is connected to a server. More...
 
int session_is_recovering (const SESSION_T *session)
 Determines if a session is in a recovering state, where it is trying to reconnect to a server. More...
 
int session_is_closed (const SESSION_T *session)
 Determines if a session is closed. More...
 
char * session_id_to_string (const SESSION_ID_T *session_id)
 Takes a session ID and produces a human-readable string. More...
 
SESSION_ID_Tsession_id_create_from_string (const char *str)
 Given a session id in string form, this function returns it to the internal structure form. More...
 
void session_id_free (SESSION_ID_T *session_id)
 Free memory associated with a session ID structure. More...
 
int session_id_cmp (const SESSION_ID_T s1, const SESSION_ID_T s2)
 Compare two session IDs. More...
 
TOPIC_HANDLER_T set_global_topic_handler (SESSION_T *session, const TOPIC_HANDLER_T handler)
 Sets the handler for topics received but not subscribed to. More...
 
int session_set_maximum_outbound_queue_size (SESSION_T *session, int size)
 Sets the maximum size of the outbound queue. More...
 

Detailed Description

Functions relating to a session and session management.