Macros | Functions
Vortex Channel: Related function to create and manage Vortex Channels.

Macros

#define CHANNEL_CTX(channel)   (vortex_channel_get_ctx (channel))
 Allows to get context associated to the channel provided. More...
 

Functions

axl_bool vortex_channel_are_equal (VortexChannel *channelA, VortexChannel *channelB)
 Allows to check if both references provided points to the same channel (VortexChannel). More...
 
axl_bool vortex_channel_block_until_replies_are_sent (VortexChannel *channel, long microseconds_to_wait)
 Block the caller until all pending replies are sent for the channel provided. More...
 
axl_bool vortex_channel_close (VortexChannel *channel, VortexOnClosedNotification on_closed)
 Close the given channel. More...
 
axl_bool vortex_channel_close_full (VortexChannel *channel, VortexOnClosedNotificationFull on_closed, axlPointer user_data)
 Close the given channel, allowing to provide a user defined pointer to be passed to the callback. More...
 
WaitReplyDatavortex_channel_create_wait_reply (void)
 Creates a new wait reply to be used to wait for a specific reply. More...
 
void vortex_channel_defer_start (VortexChannel *channel)
 Allows to configure the channel provided to defer its reply for an incoming start channel request received. More...
 
void vortex_channel_delete_data (VortexChannel *channel, axlPointer key)
 Allows to remove data associated to the channel via vortex_channel_set_data_full without calling to defined destroy functions. More...
 
axl_bool vortex_channel_finalize_ans_rpy (VortexChannel *channel, int msg_no_rpy)
 Allows to finalize the series of ANS reply already sent with a NUL reply. More...
 
void vortex_channel_flag_reply_processed (VortexChannel *channel, axl_bool flag)
 Allows to flag that the channel have processed its last reply (DEPRECATED, DO NOT USE). More...
 
void vortex_channel_free (VortexChannel *channel)
 free channel allocated resources. More...
 
void vortex_channel_free_wait_reply (WaitReplyData *wait_reply)
 Terminates allocated memory by wait reply data. More...
 
int vortex_channel_get_automatic_mime (VortexChannel *channel)
 Allows to get current automatic MIME header handling associated to the channel provided. More...
 
VortexConnectionvortex_channel_get_connection (VortexChannel *channel)
 Returns actual channel session (or Vortex Connection). More...
 
VortexCtxvortex_channel_get_ctx (VortexChannel *channel)
 Allows to get the context under which the channel was created (VortexCtx). More...
 
axlPointer vortex_channel_get_data (VortexChannel *channel, axlPointer key)
 Returns the value indexed by the given key inside the given channel. More...
 
int vortex_channel_get_last_msg_no_received (VortexChannel *channel)
 Allows to get latest message number received on the provided channel. More...
 
const char * vortex_channel_get_mime_type (VortexChannel *channel)
 Returns current mime type used for messages exchange perform on the given channel. More...
 
unsigned int vortex_channel_get_next_ans_no (VortexChannel *channel)
 Gets next ansno number to be used for the next message to be sent. More...
 
unsigned int vortex_channel_get_next_expected_ans_no (VortexChannel *channel)
 Returns the next expected ansno number message to be received. More...
 
int vortex_channel_get_next_expected_reply_no (VortexChannel *channel)
 Returns the next channel MSG no that is expected to be received on this channel. More...
 
unsigned int vortex_channel_get_next_expected_seq_no (VortexChannel *channel)
 Returns actual seq no expected to be received on this channel. More...
 
int vortex_channel_get_next_frame_size (VortexChannel *channel, unsigned int next_seq_no, int message_size, unsigned int max_seq_no)
 Gets the amount of data to be copied from the pending message into the frame about being fragmented or built. More...
 
int vortex_channel_get_next_msg_no (VortexChannel *channel)
 Returns the next message number to be used on this channel. More...
 
int vortex_channel_get_next_reply_no (VortexChannel *channel)
 Allows to get next reply number expected on this channel. More...
 
unsigned int vortex_channel_get_next_seq_no (VortexChannel *channel)
 Returns next sequence number to be used. More...
 
int vortex_channel_get_number (VortexChannel *channel)
 Returns the channel number for selected channel. More...
 
int vortex_channel_get_outstanding_messages (VortexChannel *channel, int *outstanding_limit)
 Allows to get number of unreplied message (MSG) that are waiting on the provided channel, and optionally, also returns the outstanding limit (if any). More...
 
VortexFramevortex_channel_get_piggyback (VortexChannel *channel)
 Allows to get initial piggyback received on the channel start reply. More...
 
VortexChannelPoolvortex_channel_get_pool (VortexChannel *channel)
 Allows to get channel pool associated to the channel provided. More...
 
const char * vortex_channel_get_profile (VortexChannel *channel)
 Returns the current profile the channel is running. More...
 
VortexFramevortex_channel_get_reply (VortexChannel *channel, VortexAsyncQueue *queue)
 Allows to get the next frame received on the given channel due to channel start reply piggybacking or due to a frame received while using the function vortex_channel_queue_reply as a frame received handler. More...
 
const char * vortex_channel_get_transfer_encoding (VortexChannel *channel)
 Returns current content transfer encoding used for messages exchange perform on the given channel. More...
 
int vortex_channel_get_window_size (VortexChannel *channel)
 Returns actual channel window size. More...
 
axl_bool vortex_channel_have_complete_flag (VortexChannel *channel)
 Allows to get actual complete flag status for the given channel. More...
 
axl_bool vortex_channel_have_piggyback (VortexChannel *channel)
 Allows to check if the given channel have piggyback waiting to be processed. More...
 
axl_bool vortex_channel_is_being_closed (VortexChannel *channel)
 Return if a channel is on the process of being closed. More...
 
axl_bool vortex_channel_is_defined_close_handler (VortexChannel *channel)
 Returns if the given channel have defined its close handler. More...
 
axl_bool vortex_channel_is_defined_received_handler (VortexChannel *channel)
 Return whenever the received handler have been defined for this channel. More...
 
axl_bool vortex_channel_is_empty_pending_message (VortexChannel *channel)
 Allows to check if the provided channel has pending channels to be sent (they are queued due to performance reasons like remote window exhausted). More...
 
axl_bool vortex_channel_is_opened (VortexChannel *channel)
 Return channel opened state. More...
 
axl_bool vortex_channel_is_ready (VortexChannel *channel)
 Returns the actual state for a given channel about pending replies to be received (not pending replies to be sent). More...
 
axl_bool vortex_channel_is_running_profile (VortexChannel *channel, const char *profile)
 Allows to check if the given channel is running a particular profile. More...
 
axl_bool vortex_channel_is_stalled (VortexChannel *channel)
 Allows to check if a channel is stalled (no more remote buffer available to hold more content). More...
 
VortexChannelvortex_channel_new (VortexConnection *connection, int channel_num, const char *profile, VortexOnCloseChannel close, axlPointer close_user_data, VortexOnFrameReceived received, axlPointer received_user_data, VortexOnChannelCreated on_channel_created, axlPointer user_data)
 Creates a new channel over the given connection. More...
 
VortexChannelvortex_channel_new_full (VortexConnection *connection, int channel_num, const char *serverName, const char *profile, VortexEncoding encoding, const char *profile_content, int profile_content_size, VortexOnCloseChannel close, axlPointer close_user_data, VortexOnFrameReceived received, axlPointer received_user_data, VortexOnChannelCreated on_channel_created, axlPointer user_data)
 Extended version for vortex_channel_new, supporting all options available while creating new channels. More...
 
VortexChannelvortex_channel_new_fullv (VortexConnection *connection, int channel_num, const char *serverName, const char *profile, VortexEncoding encoding, VortexOnCloseChannel close, axlPointer close_user_data, VortexOnFrameReceived received, axlPointer received_user_data, VortexOnChannelCreated on_channel_created, axlPointer user_data, const char *profile_content_format,...)
 Allows to create a new channel using all possible option and making possible to define profile content using a printf-like syntax. More...
 
void vortex_channel_notify_close (VortexChannel *channel, int msg_no, axl_bool close)
 Allows to notify the channel close after receiving the close notification request. More...
 
axl_bool vortex_channel_notify_start (VortexChannel *new_channel, const char *profile_content_reply, axl_bool action)
 Allows to perform a notification for a channel start that was deferred. More...
 
void vortex_channel_queue_reply (VortexChannel *channel, VortexConnection *connection, VortexFrame *frame, axlPointer user_data)
 Support function that could be used as a frame received function which queue all frames received inside a VortexAsyncQueue. More...
 
axl_bool vortex_channel_ref (VortexChannel *channel)
 Allows to increase reference counting for the provided channel. More...
 
axl_bool vortex_channel_ref2 (VortexChannel *channel, const char *label)
 Allows to increase reference counting for the provided channel. More...
 
int vortex_channel_ref_count (VortexChannel *channel)
 Allows to get current reference counting for the channel provided. More...
 
axl_bool vortex_channel_send_ans_rpy (VortexChannel *channel, const void *message, size_t message_size, int msg_no_rpy)
 Allows to perform an ANS/NUL reply to a given MSG frame received. More...
 
axl_bool vortex_channel_send_ans_rpy_from_feeder (VortexChannel *channel, VortexPayloadFeeder *feeder, int msg_no_rpy)
 Allows to send an ANS frame taking the content from the feeder provided. More...
 
axl_bool vortex_channel_send_ans_rpyv (VortexChannel *channel, int msg_no_rpy, const char *format,...)
 Allows to send ANS message reply using stdargs argument. More...
 
axl_bool vortex_channel_send_err (VortexChannel *channel, const void *message, size_t message_size, int msg_no_rpy)
 Allows to reply a message using ERR message type. More...
 
axl_bool vortex_channel_send_err_more (VortexChannel *channel, const void *message, size_t message_size, int msg_no_rpy)
 Allows to send an ERR BEEP frame flagging all frames with more flag enabled. More...
 
axl_bool vortex_channel_send_errv (VortexChannel *channel, int msg_no_err, const char *format,...)
 Printf-like version for vortex_channel_send_err. More...
 
axl_bool vortex_channel_send_msg (VortexChannel *channel, const void *message, size_t message_size, int *msg_no)
 Sends the message over the selected channel. More...
 
axl_bool vortex_channel_send_msg_and_wait (VortexChannel *channel, const void *message, size_t message_size, int *msg_no, WaitReplyData *wait_reply)
 Allows to send a message and start a wait reply. More...
 
axl_bool vortex_channel_send_msg_and_waitv (VortexChannel *channel, int *msg_no, WaitReplyData *wait_reply, const char *format,...)
 Printf-like version for the vortex_channel_send_msg_and_wait function. More...
 
axl_bool vortex_channel_send_msg_from_feeder (VortexChannel *channel, VortexPayloadFeeder *feeder)
 Request to send a new MSG frame on the provided channel, taking as input the content received from the feeder provided. More...
 
axl_bool vortex_channel_send_msg_more (VortexChannel *channel, const void *message, size_t message_size, int *msg_no)
 Allows to send a message, producing required fragments, but ensuring all frames have more flag enabled. More...
 
axl_bool vortex_channel_send_msgv (VortexChannel *channel, int *msg_no, const char *format,...)
 Allows to send message using a printf-like format. More...
 
axl_bool vortex_channel_send_rpy (VortexChannel *channel, const void *message, size_t message_size, int msg_no_rpy)
 Allows to send a message reply using RPY type. More...
 
axl_bool vortex_channel_send_rpy_from_feeder (VortexChannel *channel, VortexPayloadFeeder *feeder, int msg_no_rpy)
 Allowsto send a RPY message in reply to the provided msg_no_rpy, using a feeder to fill the content. More...
 
axl_bool vortex_channel_send_rpy_more (VortexChannel *channel, const void *message, size_t message_size, int msg_no_rpy)
 Allows to send a RPY message but signal it as not complete. More...
 
axl_bool vortex_channel_send_rpyv (VortexChannel *channel, int msg_no_rpy, const char *format,...)
 printf-like version for vortex_channel_send_rpy function. More...
 
void vortex_channel_set_automatic_mime (VortexChannel *channel, int value)
 Allows to configure automatic MIME header addition handling at channel level (only the channel is affected). More...
 
void vortex_channel_set_close_handler (VortexChannel *channel, VortexOnCloseChannel close, axlPointer user_data)
 Allows to set close channel handler for the given channel. More...
 
void vortex_channel_set_close_notify_handler (VortexChannel *channel, VortexOnNotifyCloseChannel close_notify, axlPointer user_data)
 Allows to configure the close notify handler on the provided channel. More...
 
void vortex_channel_set_closed_handler (VortexChannel *channel, VortexOnClosedChannel closed, axlPointer user_data)
 Allows to configure the closed handler: a notification that the channel is about to be removed from the connection. More...
 
void vortex_channel_set_complete_flag (VortexChannel *channel, axl_bool value)
 Allows to set complete frames flag. More...
 
void vortex_channel_set_complete_frame_limit (VortexChannel *channel, int max_payload_size)
 Allows to configure the max complete frame size that can be received having complete flag enabled. More...
 
void vortex_channel_set_data (VortexChannel *channel, axlPointer key, axlPointer value)
 Allows to store a pair key/value associated to the channel. More...
 
void vortex_channel_set_data_full (VortexChannel *channel, axlPointer key, axlPointer value, axlDestroyFunc key_destroy, axlDestroyFunc value_destroy)
 Allows to store a pair key/value associated to the channel, with optional destroy handlers. More...
 
VortexChannelFrameSize vortex_channel_set_next_frame_size_handler (VortexChannel *channel, VortexChannelFrameSize next_frame_size, axlPointer user_data)
 Allows to configure the VortexChannelFrameSize handler to be used by the sequencer to decide how many data is used into each frame produced (outstanding frames). More...
 
void vortex_channel_set_outstanding_limit (VortexChannel *channel, int pending_messages, axl_bool fail_on_limit)
 Allows to configure an outstanding send limit, causing all send operations (MSG) to be blocked (or to fail) if such limit is reached. More...
 
void vortex_channel_set_received_handler (VortexChannel *channel, VortexOnFrameReceived received, axlPointer user_data)
 Allows to set the frame received handler. More...
 
void vortex_channel_set_serialize (VortexChannel *channel, axl_bool serialize)
 Allows to serialize all messages/replies (MSG, ERR, RPY, ANS/NUL) received on a particular channel, by checking that previous messages/replies were delivered, avoiding thread race conditions. More...
 
void vortex_channel_set_window_size (VortexChannel *channel, int desired_size)
 Allows the caller to change the channel window size. More...
 
void vortex_channel_unref (VortexChannel *channel)
 Decrease in one unit the reference count for the channel provided. More...
 
void vortex_channel_unref2 (VortexChannel *channel, const char *label)
 Decrease in one unit the reference count for the channel provided. More...
 
axl_bool vortex_channel_validate_err (VortexFrame *frame, char **code, char **msg)
 Validates err message received from remote peer. More...
 
VortexFramevortex_channel_wait_reply (VortexChannel *channel, int msg_no, WaitReplyData *wait_reply)
 Allows caller to wait for a particular reply to be received. More...
 
axl_bool vortex_channel_wait_reply_ref (WaitReplyData *wait_reply)
 Allows to increase wait reply ref count. More...
 

Detailed Description