forked from enlightenment/efl
ecore: Add pipelining support for HTTP 1.1.
SVN revision: 58265
This commit is contained in:
parent
cc151e55cf
commit
8292de72f2
|
@ -108,3 +108,8 @@
|
||||||
* Ecore_X gains some more x sync counter controls and Ecore_Evas
|
* Ecore_X gains some more x sync counter controls and Ecore_Evas
|
||||||
now uses the netwm sync protocol to get wm's to only configure
|
now uses the netwm sync protocol to get wm's to only configure
|
||||||
as fast as it can keep drawing.
|
as fast as it can keep drawing.
|
||||||
|
|
||||||
|
2011-04-01 Cedric Bail
|
||||||
|
|
||||||
|
* Add ecore_con_url_pipeline_set and ecore_con_url_pipeline_get for HTTP 1.1
|
||||||
|
pipelining support.
|
||||||
|
|
|
@ -525,6 +525,10 @@ typedef enum _Ecore_Con_Url_Time
|
||||||
|
|
||||||
EAPI int ecore_con_url_init(void);
|
EAPI int ecore_con_url_init(void);
|
||||||
EAPI int ecore_con_url_shutdown(void);
|
EAPI int ecore_con_url_shutdown(void);
|
||||||
|
|
||||||
|
EAPI void ecore_con_url_pipeline_set(Eina_Bool enable);
|
||||||
|
EAPI Eina_Bool ecore_con_url_pipeline_get(void);
|
||||||
|
|
||||||
EAPI Ecore_Con_Url * ecore_con_url_new(const char *url);
|
EAPI Ecore_Con_Url * ecore_con_url_new(const char *url);
|
||||||
EAPI Ecore_Con_Url * ecore_con_url_custom_new(const char *url,
|
EAPI Ecore_Con_Url * ecore_con_url_custom_new(const char *url,
|
||||||
const char *custom_request);
|
const char *custom_request);
|
||||||
|
|
|
@ -96,6 +96,7 @@ static CURLM *_curlm = NULL;
|
||||||
static fd_set _current_fd_set;
|
static fd_set _current_fd_set;
|
||||||
static int _init_count = 0;
|
static int _init_count = 0;
|
||||||
static Ecore_Timer *_curl_timeout = NULL;
|
static Ecore_Timer *_curl_timeout = NULL;
|
||||||
|
static Eina_Bool pipelining = EINA_FALSE;
|
||||||
|
|
||||||
typedef struct _Ecore_Con_Url_Event Ecore_Con_Url_Event;
|
typedef struct _Ecore_Con_Url_Event Ecore_Con_Url_Event;
|
||||||
struct _Ecore_Con_Url_Event
|
struct _Ecore_Con_Url_Event
|
||||||
|
@ -241,6 +242,35 @@ ecore_con_url_shutdown(void)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enable or disable HTTP 1.1 pipelining.
|
||||||
|
* @param enable EINA_TRUE will turn it on, EINA_FALSE will disable it.
|
||||||
|
*/
|
||||||
|
EAPI void
|
||||||
|
ecore_con_url_pipeline_set(Eina_Bool enable)
|
||||||
|
{
|
||||||
|
#ifdef HAVE_CURL
|
||||||
|
if (enable)
|
||||||
|
curl_multi_setopt(_curlm, CURLMOPT_PIPELINING, 1);
|
||||||
|
else
|
||||||
|
curl_multi_setopt(_curlm, CURLMOPT_PIPELINING, 1);
|
||||||
|
pipelining = enable;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Is HTTP 1.1 pipelining enable ?
|
||||||
|
* @return EINA_TRUE if it is enable.
|
||||||
|
*/
|
||||||
|
EAPI Eina_Bool
|
||||||
|
ecore_con_url_pipeline_get(void)
|
||||||
|
{
|
||||||
|
#ifdef HAVE_CURL
|
||||||
|
return pipelining;
|
||||||
|
#endif
|
||||||
|
return EINA_FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates and initializes a new Ecore_Con_Url connection object.
|
* Creates and initializes a new Ecore_Con_Url connection object.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue