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.

Parameters:
connection Session where channel will be created.
channel_num The channel number. Using 0 automatically assigns the next channel number free.
serverName Data sent to the remote site as an initial data exchanged.
profile The profile under the channel will be created.
encoding Profile content encoding used.
profile_content The 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_size How huge is the content profile data.
close Handler to manage channel closing.
close_user_data User data to be passed in to close handler.
received Handler to manage frame reception on channel.
received_user_data Data to be passed in to received handler.
on_channel_created A callback to be able to make channel process to be async.
user_data User data to be passed in to on_channel_created.
Returns:
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.