VortexConnection * vortex_http_connection_new ( const char *  host,
const char *  port,
VortexHttpSetup setup,
VortexConnectionNew  on_connected,
axlPointer  user_data 

Creates a new BEEP connection to a remote BEEP server, by connecting to a HTTP server supporting HTTP CONNECT method (proxy server).

hostThe remote peer to connect to. This value will be used for the Host HTTP header.
portThe peer's port to connect to. This value will be used for the port part of the Host header.
setupAdditional connection options. This can be used to configure a HTTP proxy with CONNECT support, authenticaion, etc. This reference is not optional. It must configure, at least, proxy host and its port.
on_connectedOptional handler to process connection new status.
user_dataOptional handler to process connection new status
A newly created VortexConnection if called in a blocking manner, that is, without providing the on_connected handler. If you provide the on_connected handler, the function will return NULL, and the connection created will be notified on the handler on_connected. In both cases, you must use vortex_connection_is_ok to check if you are already connected.

NOTE: The VortexCtx object to be used on this function will be the one configured on setup parameter (reference provided at vortex_http_setup_new). This means you'll have to create different VortexHttpSetup instances for each context you have.

References vortex_http_setup_ref(), and vortex_thread_pool_new_task().