Loading docs/examples/ghiper.c +10 −1 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms Loading Loading @@ -163,6 +163,15 @@ static int update_timeout_cb(CURLM *multi, long timeout_ms, void *userp) MSG_OUT("*** update_timeout_cb %ld => %ld:%ld ***\n", timeout_ms, timeout.tv_sec, timeout.tv_usec); /* TODO * * if timeout_ms is 0, call curl_multi_socket_action() at once! * * if timeout_ms is -1, just delete the timer * * for all other values of timeout_ms, this should set or *update* * the timer to the new value */ g->timer_event = g_timeout_add(timeout_ms, timer_cb, g); return 0; } Loading docs/examples/hiperfifo.c +11 −3 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms Loading Loading @@ -108,8 +108,6 @@ typedef struct _SockInfo GlobalInfo *global; } SockInfo; /* Update the event timer after curl_multi library calls */ static int multi_timer_cb(CURLM *multi, long timeout_ms, GlobalInfo *g) { Loading @@ -119,6 +117,16 @@ static int multi_timer_cb(CURLM *multi, long timeout_ms, GlobalInfo *g) timeout.tv_sec = timeout_ms/1000; timeout.tv_usec = (timeout_ms%1000)*1000; fprintf(MSG_OUT, "multi_timer_cb: Setting timeout to %ld ms\n", timeout_ms); /* TODO * * if timeout_ms is 0, call curl_multi_socket_action() at once! * * if timeout_ms is -1, just delete the timer * * for all other values of timeout_ms, this should set or *update* * the timer to the new value */ evtimer_add(g->timer_event, &timeout); return 0; } Loading Loading
docs/examples/ghiper.c +10 −1 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms Loading Loading @@ -163,6 +163,15 @@ static int update_timeout_cb(CURLM *multi, long timeout_ms, void *userp) MSG_OUT("*** update_timeout_cb %ld => %ld:%ld ***\n", timeout_ms, timeout.tv_sec, timeout.tv_usec); /* TODO * * if timeout_ms is 0, call curl_multi_socket_action() at once! * * if timeout_ms is -1, just delete the timer * * for all other values of timeout_ms, this should set or *update* * the timer to the new value */ g->timer_event = g_timeout_add(timeout_ms, timer_cb, g); return 0; } Loading
docs/examples/hiperfifo.c +11 −3 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms Loading Loading @@ -108,8 +108,6 @@ typedef struct _SockInfo GlobalInfo *global; } SockInfo; /* Update the event timer after curl_multi library calls */ static int multi_timer_cb(CURLM *multi, long timeout_ms, GlobalInfo *g) { Loading @@ -119,6 +117,16 @@ static int multi_timer_cb(CURLM *multi, long timeout_ms, GlobalInfo *g) timeout.tv_sec = timeout_ms/1000; timeout.tv_usec = (timeout_ms%1000)*1000; fprintf(MSG_OUT, "multi_timer_cb: Setting timeout to %ld ms\n", timeout_ms); /* TODO * * if timeout_ms is 0, call curl_multi_socket_action() at once! * * if timeout_ms is -1, just delete the timer * * for all other values of timeout_ms, this should set or *update* * the timer to the new value */ evtimer_add(g->timer_event, &timeout); return 0; } Loading