Webcom C SDK
|
Data Structures | |
struct | wc_eli_callbacks |
wc_context_t * | wc_context_create_with_libev (struct wc_context_options *options, struct ev_loop *loop, struct wc_eli_callbacks *callbacks) |
wc_context_t* wc_context_create_with_libev | ( | struct wc_context_options * | options, |
struct ev_loop * | loop, | ||
struct wc_eli_callbacks * | callbacks | ||
) |
This SDK is designed using an asynchronous, event-based approach, and is perfectly suited to be used in a mono-threaded application.
To greatly relieve the burden of registering to, and handling all the I/O and timer events the SDK must be aware of, and if you don't mind making your application rely on libev, we've already taken care of everything.
The key idea is to call the corresponding wc_context_new_with_libev()
function, and pass :
This function creates a new Webcom context, an initiates the connection towards the server. All the underlying I/O and timer events will be taken care of by libev.
If the http_proxy environment variable is set, the connection will be established through this HTTP proxy.
options | a pointer to a structure bearing the connection informations |
loop | a pointer to a libev loop object |
callbacks | a structure containing the callbacks to trigger for various events |