((x) && (((struct SessionHandle *)(x))->magic == CURLEASY_MAGIC_NUMBER))
static void singlesocket(struct Curl_multi *multi,
- struct Curl_one_easy *easy);
+ struct SessionHandle *easy);
static int update_timer(struct Curl_multi *multi);
static bool isHandleAtHead(struct SessionHandle *handle,
static void multi_freetimeout(void *a, void *b);
/* always use this function to change state, to make debugging easier */
-static void mstate(struct Curl_one_easy *easy, CURLMstate state
+static void mstate(struct SessionHandle *easy, CURLMstate state
#ifdef DEBUGBUILD
, int lineno
#endif
CURL *easy_handle)
{
struct curl_llist *timeoutlist;
- struct Curl_one_easy *easy;
+ struct SessionHandle *easy;
struct Curl_multi *multi = (struct Curl_multi *)multi_handle;
struct SessionHandle *data = (struct SessionHandle *)easy_handle;
struct SessionHandle *new_closure = NULL;
easy->state.conn_cache = multi->conn_cache;
/* This adds the new entry at the 'end' of the doubly-linked circular
- list of Curl_one_easy structs to try and maintain a FIFO queue so
+ list of SessionHandle structs to try and maintain a FIFO queue so
the pipelined requests are in order. */
/* We add this new entry last in the list. */
easy->next = NULL; /* end of the line */
if(multi->easyp) {
- struct Curl_one_easy *last = multi->easylp;
+ struct SessionHandle *last = multi->easylp;
last->next = easy;
easy->prev = last;
multi->easylp = easy; /* the new last node */
void Curl_multi_handlePipeBreak(struct SessionHandle *data)
{
- struct Curl_one_easy *one_easy = data->set.one_easy;
+ struct SessionHandle *one_easy = data->set.one_easy;
if(one_easy)
one_easy->easy_conn = NULL;
}
/* returns bitmapped flags for this handle and its sockets */
-static int multi_getsock(struct Curl_one_easy *easy,
+static int multi_getsock(struct SessionHandle *easy,
curl_socket_t *socks, /* points to numsocks number
of sockets */
int numsocks)
Some easy handles may not have connected to the remote host yet,
and then we must make sure that is done. */
struct Curl_multi *multi=(struct Curl_multi *)multi_handle;
- struct Curl_one_easy *easy;
+ struct SessionHandle *easy;
int this_max_fd=-1;
curl_socket_t sockbunch[MAX_SOCKSPEREASYHANDLE];
int bitmap;
int *ret)
{
struct Curl_multi *multi=(struct Curl_multi *)multi_handle;
- struct Curl_one_easy *easy;
+ struct SessionHandle *easy;
curl_socket_t sockbunch[MAX_SOCKSPEREASYHANDLE];
int bitmap;
unsigned int i;
static CURLMcode multi_runsingle(struct Curl_multi *multi,
struct timeval now,
- struct Curl_one_easy *easy)
+ struct SessionHandle *easy)
{
struct Curl_message *msg = NULL;
bool connected;
CURLMcode curl_multi_perform(CURLM *multi_handle, int *running_handles)
{
struct Curl_multi *multi=(struct Curl_multi *)multi_handle;
- struct Curl_one_easy *easy;
+ struct SessionHandle *easy;
CURLMcode returncode=CURLM_OK;
struct Curl_tree *t;
struct timeval now = Curl_tvnow();
CURLMcode curl_multi_cleanup(CURLM *multi_handle)
{
struct Curl_multi *multi=(struct Curl_multi *)multi_handle;
- struct Curl_one_easy *easy;
- struct Curl_one_easy *nexteasy;
+ struct SessionHandle *easy;
+ struct SessionHandle *nexteasy;
if(GOOD_MULTI_HANDLE(multi)) {
multi->type = 0; /* not good anymore */
* call the callback accordingly.
*/
static void singlesocket(struct Curl_multi *multi,
- struct Curl_one_easy *easy)
+ struct SessionHandle *easy)
{
curl_socket_t socks[MAX_SOCKSPEREASYHANDLE];
int i;
struct timeval now = Curl_tvnow();
if(checkall) {
- struct Curl_one_easy *easy;
+ struct SessionHandle *easy;
/* *perform() deals with running_handles on its own */
result = curl_multi_perform(multi, running_handles);
void Curl_multi_process_pending_handles(struct Curl_multi *multi)
{
- struct Curl_one_easy *easy;
+ struct SessionHandle *easy;
easy=multi->easyp;
while(easy) {
void Curl_multi_dump(const struct Curl_multi *multi_handle)
{
struct Curl_multi *multi=(struct Curl_multi *)multi_handle;
- struct Curl_one_easy *easy;
+ struct SessionHandle *easy;
int i;
fprintf(stderr, "* Multi status: %d handles, %d alive\n",
multi->num_easy, multi->num_alive);
* the 'DynamicStatic' struct.
* Character pointer fields point to dynamic storage, unless otherwise stated.
*/
-struct Curl_one_easy; /* declared and used only in multi.c */
+
struct Curl_multi; /* declared and used only in multi.c */
enum dupstring {
long buffer_size; /* size of receive buffer to use */
void *private_data; /* application-private data */
- struct Curl_one_easy *one_easy; /* When adding an easy handle to a multi
+ struct SessionHandle *one_easy; /* When adding an easy handle to a multi
handle, an internal 'Curl_one_easy'
struct is created and this is a pointer
to the particular struct associated with
struct SessionHandle {
/* first, two fields for the linked list of these */
- struct Curl_one_easy *next;
- struct Curl_one_easy *prev;
+ struct SessionHandle *next;
+ struct SessionHandle *prev;
struct connectdata *easy_conn; /* the "unit's" connection */