VortexChannel * vortex_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.

This function allows to create a new channel like vortex_channel_new does, but providing support for all options that are available described by the BEEP definition. Options provided by this function not provided by vortex_channel_new are:

  • This function allows to set the serverName parameter for the start element. This parameter is used by some profiles definitions, as TLS, to establish default certificate to be used inside the session tuning.
  • This function allows to configure the profile element content and its encoding. Again, some profiles definition needs to send additional data inside the profile element during the channel creation exchange.

You can check the full documentation on how to use the function at vortex_channel_new. Apart from previous parameters, this function does the same operations.

While sending profile content data you must provide its encoding. Allowed encoding you have to use are none and base64. Vortex Library allows you to report which encoding is used for the profile content with VortexEncoding. By default, unless explicit use by the profile definition or by your requirements, you should use EncodingNone.

This function doesn't encode data received into the encoding selected. This is a task reserved to the profile implementation or the application level. Encoding value is used to report to the remote peer which encoding is being used.

For the content profile data and the serverName this function will perform a local copy of the given data. If one of both is NULL it will ignored.

connectionSession where channel will be created.
channel_numThe channel number. Using 0 automatically assigns the next channel number free.
serverNameData sent to the remote site as an initial data exchanged.
profileThe profile under the channel will be created.
encodingProfile content encoding used.
profile_contentThe profile content data to be sent on channel creation request. This data is also referred as piggyback. The function will perform a copy of the content profile passed in. The content passed must not include the CDATA declaration. This is already added by the function. "your-content".
profile_content_sizeHow huge is the content profile data.
closeHandler to manage channel closing.
close_user_dataUser data to be passed in to close handler.
receivedHandler to manage frame reception on channel.
received_user_dataData to be passed in to received handler.
on_channel_createdAn async callback where the channel creation is notified. Defining this callback makes the function to not block the caller.
user_dataUser data to be passed in to on_channel_created.
the newly created channel or NULL if fails under non-threaded model. Under threaded model returned value will always be NULL and newly channel created will be notified on on_channel_created.

References vortex_connection_get_ctx(), vortex_connection_get_server_name(), vortex_connection_is_ok(), vortex_connection_ref(), and vortex_thread_pool_new_task().

Referenced by vortex_channel_new(), and vortex_channel_new_fullv().