这篇教程C++ uv_timer_stop函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中uv_timer_stop函数的典型用法代码示例。如果您正苦于以下问题:C++ uv_timer_stop函数的具体用法?C++ uv_timer_stop怎么用?C++ uv_timer_stop使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了uv_timer_stop函数的29个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: iotjs_https_uv_timeout_callback// This function is for signalling to curl a given time has passed.// This timeout is usually given by curl itself.void iotjs_https_uv_timeout_callback(uv_timer_t* timer) { iotjs_https_t* https_data = (iotjs_https_t*)(timer->data); IOTJS_VALIDATED_STRUCT_METHOD(iotjs_https_t, https_data); uv_timer_stop(timer); curl_multi_socket_action(_this->curl_multi_handle, CURL_SOCKET_TIMEOUT, 0, &_this->running_handles); iotjs_https_check_done(https_data);}
开发者ID:drashti304,项目名称:TizenRT,代码行数:10,
示例2: del_deferstatic void del_defer(void *glue_data, void *id){ dfr_t *d = (dfr_t *)id; IOT_UNUSED(glue_data); uv_timer_stop(&d->uv_tmr); iot_free(d);}
开发者ID:avalluri,项目名称:iot-app-fw,代码行数:9,
示例3: uv_timer_stop void Timer::stop() { int r = uv_timer_stop(&handle); if (r < 0) { throw std::runtime_error(uv_strerror(r)); } self.reset(); }
开发者ID:rioki,项目名称:async,代码行数:9,
示例4: delete_timerstatic void delete_timer(lcb_io_opt_t iobase, void *timer_opaque){ my_timer_t *timer = (my_timer_t *)timer_opaque; uv_timer_stop(&timer->uvt); timer->callback = NULL; (void)iobase;}
开发者ID:00christian00,项目名称:couchnode,代码行数:9,
示例5: uv_timer_stopvoid HTTPCURLRequest::retry() { // All batons get notified when the network status changed, but some of them // might not actually wait for the network to become available again. if (timer && strategy == PreemptImmediately) { // Triggers the timer upon the next event loop iteration. uv_timer_stop(timer); uv_timer_start(timer, restart, 0, 0); }}
开发者ID:MaxGraey,项目名称:mapbox-gl-native,代码行数:9,
示例6: invoke_taskstatic voidinvoke_task(uv_timer_t* timer, int unused){ task_timer* t = (task_timer*)timer->data; t->task(t->data); t->dtor(t->data); uv_timer_stop(timer); free(t);}
开发者ID:JulianoSousa,项目名称:echojs,代码行数:9,
示例7: timer_cbstatic void timer_cb(uv_timer_t* handle, int status) { ASSERT(handle == &timer_handle); ASSERT(status == 0); timer_called++; if (timer_called == 1) uv_stop(uv_default_loop()); else if (timer_called == num_ticks) uv_timer_stop(handle);}
开发者ID:FinlayDaG33k,项目名称:cjdns,代码行数:9,
示例8: lws_email_destroyLWS_VISIBLE LWS_EXTERN voidlws_email_destroy(struct lws_email *email){ if (email->content) lws_free_set_NULL(email->content); uv_timer_stop(&email->timeout_email); uv_close((uv_handle_t *)&email->timeout_email, NULL);}
开发者ID:ABruines,项目名称:libwebsockets,代码行数:9,
示例9: del_timerstatic void del_timer(void *glue_data, void *id){ tmr_t *t = (tmr_t *)id; IOT_UNUSED(glue_data); uv_timer_stop(&t->uv_tmr); iot_free(t);}
开发者ID:avalluri,项目名称:iot-app-fw,代码行数:9,
示例10: on_get_host_addrs_static void on_get_host_addrs_(uv_getaddrinfo_t *req, int status, struct addrinfo *addrs){ wsn_client_ctx_t *client = CONTAINER_OF(req, wsn_client_ctx_t, getaddrinfo_req); uv_timer_stop(&client->timer_handle); if (status < 0) { wsn_report_err(WSN_ERR_GET_ADDR_INFO, "Failed to getaddrinfo for client to (/"%s/"): %s", client->conf->host, uv_strerror(status)); uv_freeaddrinfo(addrs); return; } int ipv4_naddrs = 0; int ipv6_naddrs = 0; for (struct addrinfo *ai = addrs; ai != NULL; ai = ai->ai_next) { if (ai->ai_family == AF_INET) { ipv4_naddrs += 1; } else if (ai->ai_family == AF_INET6) { ipv6_naddrs += 1; } } if (ipv4_naddrs == 0 && ipv6_naddrs == 0) { wsn_report_err(WSN_ERR_GET_ADDR_INFO, "Remote host (/"%s/") has no IPv4/6 addresses", client->conf->host); uv_freeaddrinfo(addrs); return; } union { struct sockaddr addr; struct sockaddr_in addr4; struct sockaddr_in6 addr6; } s; for (struct addrinfo *ai = addrs; ai != NULL; ai = ai->ai_next) { if (ai->ai_family == AF_INET) { s.addr4 = *(const struct sockaddr_in *) ai->ai_addr; s.addr4.sin_port = htons(client->conf->port); } else if (ai->ai_family == AF_INET6) { s.addr6 = *(const struct sockaddr_in6 *) ai->ai_addr; s.addr6.sin6_port = htons(client->conf->port); } else { continue; } client->host_addr = s.addr; break; } uv_freeaddrinfo(addrs); if (wsn_client_start_connect_(client) != 0) { uv_stop(client->loop); return; }}
开发者ID:yquant,项目名称:ws-node,代码行数:57,
示例11: assertvoid HTTPRequest::removeBackoffTimer() { assert(uv_thread_self() == thread_id); if (backoff_timer) { delete static_cast<RetryBaton *>(backoff_timer->data); uv_timer_stop(backoff_timer); uv_close((uv_handle_t *)backoff_timer, [](uv_handle_t *handle) { delete (uv_timer_t *)handle; }); backoff_timer = nullptr; }}
开发者ID:ariosx,项目名称:mapbox-gl-native,代码行数:9,
示例12: lua_timer_stopstatic int lua_timer_stop(lua_State * L){ int ret = -1; luatimer_t * tm = (luatimer_t *)luaL_checkudata(L, 1,UVLUA_TIMER_CLS); if(NULL != tm){ ret = uv_timer_stop(&tm->timer); } lua_pushinteger(L,ret); return 1;}
开发者ID:yinlei,项目名称:libuv-lua,代码行数:10,
示例13: mod_timerstatic void mod_timer(void *glue_data, void *id, unsigned int msecs){ uv_glue_t *uv = (uv_glue_t *)glue_data; tmr_t *t = (tmr_t *)id; uv_timer_stop(&t->uv_tmr); uv_timer_init(uv->uv, &t->uv_tmr); t->uv_tmr.data = t; uv_timer_start(&t->uv_tmr, timer_cb, msecs, msecs);}
开发者ID:avalluri,项目名称:iot-app-fw,代码行数:10,
示例14: elops_destroy_pt_uvstatic voidelops_destroy_pt_uv(struct lws_context *context, int tsi){ struct lws_context_per_thread *pt = &context->pt[tsi]; int m, ns; lwsl_info("%s: %d/n", __func__, tsi); if (!lws_check_opt(context->options, LWS_SERVER_OPTION_LIBUV)) return; if (!pt->uv.io_loop) return; if (pt->event_loop_destroy_processing_done) return; pt->event_loop_destroy_processing_done = 1; if (!pt->event_loop_foreign) { uv_signal_stop(&pt->w_sigint.uv.watcher); ns = LWS_ARRAY_SIZE(sigs); if (lws_check_opt(context->options, LWS_SERVER_OPTION_UV_NO_SIGSEGV_SIGFPE_SPIN)) ns = 2; for (m = 0; m < ns; m++) { uv_signal_stop(&pt->uv.signals[m]); uv_close((uv_handle_t *)&pt->uv.signals[m], lws_uv_close_cb_sa); } } else lwsl_debug("%s: not closing pt signals/n", __func__); uv_timer_stop(&pt->uv.timeout_watcher); uv_close((uv_handle_t *)&pt->uv.timeout_watcher, lws_uv_close_cb_sa); uv_timer_stop(&pt->uv.hrtimer); uv_close((uv_handle_t *)&pt->uv.hrtimer, lws_uv_close_cb_sa); uv_idle_stop(&pt->uv.idle); uv_close((uv_handle_t *)&pt->uv.idle, lws_uv_close_cb_sa);}
开发者ID:PKRoma,项目名称:libwebsockets,代码行数:43,
示例15: CHECK_EQvoid EventServer::remove_timer(int64_t handle) { CHECK_EQ(std::this_thread::get_id(), thread_id_); auto es_handle = timer_handles_[handle]; CHECK_EQ(0, uv_timer_stop(&es_handle->uv_handle)); uv_close(reinterpret_cast<uv_handle_t*>(&es_handle->uv_handle), &EventServer::uv_close_cb); timer_handles_.erase(handle);}
开发者ID:qiqjiao,项目名称:webcrawl,代码行数:11,
示例16: pc__timeout_cbvoid pc__timeout_cb(uv_timer_t* timeout_timer, int status) { uv_timer_stop(timeout_timer); pc_client_t *client = (pc_client_t *)timeout_timer->data; if(status == -1) { fprintf(stderr, "Pomelo timeout timer error, %s/n", uv_err_name(uv_last_error(client->uv_loop))); } else { fprintf(stderr, "Pomelo client heartbeat timeout./n"); } pc_client_stop(client);}
开发者ID:EtcDot,项目名称:PomeloCpp,代码行数:11,
示例17: iotjs_https_finish_request// Finish writing all data from ClientRequest Streamvoid iotjs_https_finish_request(iotjs_https_t* https_data) { IOTJS_VALIDATED_STRUCT_METHOD(iotjs_https_t, https_data); _this->stream_ended = true; if (_this->request_done) { iotjs_https_cleanup(https_data); } else if (_this->is_stream_writable) { curl_easy_pause(_this->curl_easy_handle, CURLPAUSE_CONT); uv_timer_stop(&(_this->timeout)); uv_timer_start(&(_this->timeout), iotjs_https_uv_timeout_callback, 1, 0); }}
开发者ID:drashti304,项目名称:TizenRT,代码行数:12,
示例18: luv_timer_stopint luv_timer_stop(lua_State* L) { uv_timer_t* handle = (uv_timer_t*)luv_checkudata(L, 1, "timer"); int err = uv_timer_stop(handle); if (err < 0) { return luaL_error(L, "timer_stop: %s", uv_strerror(err)); } luv_handle_unref(L, handle->data); return 0;}
开发者ID:Theintercooler,项目名称:luvit,代码行数:11,
示例19: uv_timer_stopvoid SyncWorker::uv_process_timer_tick_callback( uv_timer_t * handle ){ SyncWorker* inst = static_cast< SyncWorker* >( handle->data ); if ( inst == nullptr ) { uv_timer_stop( handle ); return; } inst->callback_( inst ); ++inst->loop_count_; if ( inst->finished ) { uv_timer_stop( &inst->timer_ ); SAFE_DELETE( inst ); }}
开发者ID:Yhgenomics,项目名称:maraton-framework,代码行数:20,
示例20: pc__client_reconnected_cbvoid pc__client_reconnected_cb(pc_connect_t* conn_req, int status) { pc_client_t* client = conn_req->client; client->reconnecting = 0; uv_timer_stop(&client->reconnect_timer); if (status == 0) { client->reconnects = 0; pc_emit_event(client, PC_EVENT_RECONNECT, client); } else { pc_client_stop(client); }}
开发者ID:559210,项目名称:libpomelo,代码行数:11,
示例21: assert/* * Class: com_oracle_libuv_handles_TimerHandle * Method: _stop * Signature: (J)I */JNIEXPORT jint JNICALL Java_com_oracle_libuv_handles_TimerHandle__1stop (JNIEnv *env, jobject that, jlong timer) { assert(timer); uv_timer_t* handle = reinterpret_cast<uv_timer_t*>(timer); int r = uv_timer_stop(handle); if (r) { ThrowException(env, handle->loop, "uv_timer_stop"); } return r;}
开发者ID:luojunqiang,项目名称:libuv-java,代码行数:16,
示例22: start_timeoutvoid start_timeout(CURLM *multi, long timeout_ms, void *userp) { Mathilda *m = (Mathilda *) userp; uv_timer_stop(&m->timeout); if(timeout_ms > 0) { m->timeout.data = m; uv_timer_start(&m->timeout, (uv_timer_cb) on_timeout, timeout_ms, 0); } else { on_timeout(&m->timeout); }}
开发者ID:struct,项目名称:mathilda,代码行数:11,
示例23: timer_final1static int timer_final1(void* vparam) { timer_param_t* param = (timer_param_t*)vparam; TUV_ASSERT(order_cb_called == 2); TUV_ASSERT(0 == uv_timer_stop(¶m->handle_a)); TUV_ASSERT(0 == uv_timer_stop(¶m->handle_b)); /* Test for starting handle_b then handle_a */ order_cb_called = 0; param->handle_b.data = ¶m->first; TUV_ASSERT(0 == uv_timer_start(¶m->handle_b, order_cb_b, 0, 0)); param->handle_a.data = ¶m->second; TUV_ASSERT(0 == uv_timer_start(¶m->handle_a, order_cb_a, 0, 0)); tuv_run(param->loop, timer_loop, timer_final2, param); return 1; // don't clear loop param info}
开发者ID:drashti304,项目名称:TizenRT,代码行数:20,
示例24: uv_timer_againint uv_timer_again(uv_timer_t* handle) { if (handle->timer_cb == NULL) return UV_EINVAL; if (handle->repeat) { uv_timer_stop(handle); uv_timer_start(handle, handle->timer_cb, handle->repeat, handle->repeat); } return 0;}
开发者ID:Kitware,项目名称:CMake,代码行数:11,
示例25: uv_timer_againint uv_timer_again(uv_timer_t* handle) { if (handle->timer_cb == NULL) return uv__set_artificial_error(handle->loop, UV_EINVAL); if (handle->repeat) { uv_timer_stop(handle); uv_timer_start(handle, handle->timer_cb, handle->repeat, handle->repeat); } return 0;}
开发者ID:AllSeeingEye,项目名称:node,代码行数:11,
示例26: uv__run_timersvoid uv__run_timers(uv_loop_t* loop) { uv_timer_t* handle; while ((handle = RB_MIN(uv__timers, &loop->timer_handles))) { if (handle->timeout > loop->time) break; uv_timer_stop(handle); uv_timer_again(handle); handle->timer_cb(handle, 0); }}
开发者ID:Andrepuel,项目名称:jxcore,代码行数:11,
示例27: uv_finitstatic void uv_finit(void){ //uv_unref((uv_handle_t*)&g_timer); uv_timer_stop(&g_timer); uv_stop(&g_loop); uv_async_init(&g_loop, &g_async, NULL); uv_async_send(&g_async); uv_thread_join(&g_loop_thread); if (g_sys) delete g_sys; //if (g_remote) delete g_remote;}
开发者ID:zhifeichen,项目名称:libcapture,代码行数:11,
示例28: uv_timer_stopbool Client::disconnect(){# ifndef XMRIG_PROXY_PROJECT uv_timer_stop(&m_keepAliveTimer);# endif m_expire = 0; m_failures = -1; return close();}
开发者ID:raiden017,项目名称:xmrig-amd,代码行数:11,
示例29: assertint HTTPCURLContext::startTimeout(CURLM * /* multi */, long timeout_ms, void *userp) { assert(userp); auto context = reinterpret_cast<HTTPCURLContext *>(userp); MBGL_VERIFY_THREAD(context->tid); if (timeout_ms < 0) { // A timeout of 0 ms means that the timer will invoked in the next loop iteration. timeout_ms = 0; } uv_timer_stop(context->timeout); uv_timer_start(context->timeout, onTimeout, timeout_ms, 0); return 0;}
开发者ID:MaxGraey,项目名称:mapbox-gl-native,代码行数:12,
注:本文中的uv_timer_stop函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ uv_translate_sys_error函数代码示例 C++ uv_timer_start函数代码示例 |