VortexChannelPool* vortex_channel_pool_new_full ( VortexConnection connection,
const char *  profile,
int  init_num,
VortexChannelPoolCreate  create_channel,
axlPointer  create_channel_user_data,
VortexOnCloseChannel  close,
axlPointer  close_user_data,
VortexOnFrameReceived  received,
axlPointer  received_user_data,
VortexOnChannelPoolCreated  on_channel_pool_created,
axlPointer  user_data 

Allows to create a new VortexChannelPool providing a function that is called to create channel rather allowing the pool to call vortex_channel_new directly.

This function works the same way as vortex_channel_pool_new but, it allows to provide the creation function to be used to initiate channels inside the pool.

Some BEEP profiles are simple and have no especial initial handshake to create the channel properly. In that case you can use safely vortex_channel_pool_new. However, other BEEP profiles includes an initial negotiation that requires more steps to be taken in addition to vortex_channel_new.

This is the case of the XML-RPC profile which once the channel is created, it requires to change the channel into a boot state by exchanging boot resource message and receiving a boot reply.

Because the channel pool has a generic channel creation code, it doesn't have the enough knowledge to create the channel properly, so it delegates that task to the create_channel handler. This handler must return a properly created and ready to use channel so the channel pool can manage it.

connectionThe session were channels will be created.
profileThe profile the channels will use.
init_numThe number of channels this pool will create at the startup.
closeHandler to manage channel closing.
create_channelHandler to the channel creation function.
create_channel_user_dataUser defined data to be passed to the create channel function for the first creation.
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_pool_createdA callback to be able to make channel process to be async.
user_dataUser data to be passed in to on_channel_created.
A newly created VortexChannelPool. The reference returned is already attached to the VortexConnection provided so, it is not required to release it. In the case the on_channel_pool_created handler is provided, the function returns NULL, and the channel pool reference is notified at the handler. Memory deallocation for the reference returned will be produced once the connection associated to it is deallocated.

References vortex_connection_get_ctx(), and vortex_thread_pool_new_task().

Referenced by vortex_channel_pool_new(), and vortex_xml_rpc_create_channel_pool().