typedef VortexChannel*(* VortexChannelPoolCreate)(VortexConnection *connection, int channel_num, const char *profile, VortexOnCloseChannel on_close, axlPointer on_close_user_data, VortexOnFrameReceived on_received, axlPointer on_received_user_data,axlPointer create_channel_user_data, axlPointer get_next_data)

Synchronous handler definition used by the channel pool module to create a new channel.

This function allows to notify the user code that a new channel must be created for the channel pool. This allows to place the channel creation code outside the channel pool module while the channel pool features remain the same.

The function has pretty much the same parameters as vortex_channel_new, which is quite straightforward, but two additional parametes are provided: create_channel_user_data and get_next_data. Both a pointers that are defined at the vortex_channel_pool_new_full in the first case, and at the vortex_channel_pool_get_next_ready_full.

See vortex_channel_pool_new_full for more information.

Parameters
connectionThe connection where the channel pool is asking to createa a new channel.
channel_numThe channel number to create.
profileThe profile for the channel.
on_closeThe on close handler to be executed once received a close notification.
on_close_user_dataThe on close handler user data (data provided to the on close handler).
on_receivedThe frame received handler to be executed one data is received. Once the channel is created and returned by vortex_channel_pool_get_next_ready or vortex_channel_pool_get_next_ready_full this value can be reconfigured using vortex_channel_set_received_handler.
on_received_user_dataUser defined data to be passed to the handler.
create_channel_user_dataUser defined data provided at the channel pool creation function (vortex_channel_pool_new_full).
get_next_dataOptional user reference defined at vortex_channel_pool_get_next_ready_full.
Returns
A newly created VortexChannel reference or NULL if it fails.