您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ start_connecting函数代码示例

51自学网 2021-06-03 08:21:55
  C++
这篇教程C++ start_connecting函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中start_connecting函数的典型用法代码示例。如果您正苦于以下问题:C++ start_connecting函数的具体用法?C++ start_connecting怎么用?C++ start_connecting使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了start_connecting函数的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: void

static struct client_socket *client_socket_create(					      struct addrinfo *addrinfos,					      void (*fai)(struct addrinfo *)){	struct connector *c = xalloc(sizeof *c);	struct client_socket *s = xalloc(sizeof *s);	c->socket = s;	tasklet_init(&c->tasklet, &s->base.mutex, c);	wait_list_init(&c->connecting, 0);	c->fd = -1;	c->connected = 0;	c->next_addrinfo = c->addrinfos = addrinfos;	c->fai = fai;	error_init(&c->err);	simple_socket_init(&s->base, &client_socket_ops, -1);	s->connector = c;	/* Start connecting */	mutex_lock(&s->base.mutex);	start_connecting(c);	tasklet_later(&c->tasklet, finish_connecting);	mutex_unlock(&s->base.mutex);	return s;}
开发者ID:dpw,项目名称:molerat,代码行数:28,


示例2: add_reconnect_timer

void zmq::ipc_connecter_t::process_plug (){    if (delayed_start)        add_reconnect_timer ();    else        start_connecting ();}
开发者ID:401885064,项目名称:libzmq,代码行数:7,


示例3: add_reconnect_timer

void zmq::tcp_connecter_t::process_plug (){    if (wait)        add_reconnect_timer();    else        start_connecting ();}
开发者ID:kaka11chen,项目名称:zeromq3-x,代码行数:7,


示例4: terminate

void zmq::session_base_t::detached (){    //  Transient session self-destructs after peer disconnects.    if (!connect) {        terminate ();        return;    }    //  For delayed connect situations, terminate the pipe    //  and reestablish later on    if (pipe && options.immediate == 1        && addr->protocol != "pgm" && addr->protocol != "epgm") {        pipe->hiccup ();        pipe->terminate (false);        terminating_pipes.insert (pipe);        pipe = NULL;    }    reset ();    //  Reconnect.    if (options.reconnect_ivl != -1)        start_connecting (true);    //  For subscriber sockets we hiccup the inbound pipe, which will cause    //  the socket object to resend all the subscriptions.    if (pipe && (options.type == ZMQ_SUB || options.type == ZMQ_XSUB))        pipe->hiccup ();}
开发者ID:a42,项目名称:libzmq,代码行数:29,


示例5: cancel_timer

void zmq::session_base_t::reconnect (){    //  For delayed connect situations, terminate the pipe    //  and reestablish later on    if (pipe && options.immediate == 1        && addr->protocol != "pgm" && addr->protocol != "epgm"        && addr->protocol != "norm" && addr->protocol != "udp") {        pipe->hiccup ();        pipe->terminate (false);        terminating_pipes.insert (pipe);        pipe = NULL;        if (has_linger_timer) {            cancel_timer (linger_timer_id);            has_linger_timer = false;        }    }    reset ();    //  Reconnect.    if (options.reconnect_ivl != -1)        start_connecting (true);    //  For subscriber sockets we hiccup the inbound pipe, which will cause    //  the socket object to resend all the subscriptions.    if (pipe && (options.type == ZMQ_SUB || options.type == ZMQ_XSUB || options.type == ZMQ_DISH))        pipe->hiccup ();}
开发者ID:mattconnolly,项目名称:libzmq,代码行数:29,


示例6: finish_connecting

static void finish_connecting(void *v_c){	struct connector *c = v_c;	struct client_socket *s = c->socket;	for (;;) {		if (!wait_list_down(&c->connecting, 1, &c->tasklet))			return;		if (c->connected) {			int fd = c->fd;			struct watched_fd *watched_fd = c->watched_fd;			c->fd = -1;			connector_destroy(c);			s->connector = NULL;			simple_socket_set_fd(&s->base, fd, watched_fd);			/* Access to the ops pointer is not locked.			 * But it is fine if some threads continue to			 * use the old client_socket_ops value. */			s->base.base.ops = &simple_socket_ops;			/* Tasklet got destroyed, so we are still			   holding the associated lock. */			mutex_unlock(&s->base.mutex);			return;		}		else {			/* Got POLLERR */			int e;			socklen_t len = sizeof e;			const char *syscall = "connect";			if (getsockopt(c->fd, SOL_SOCKET, SO_ERROR, &e, &len)) {				e = errno;				syscall = "getsockopt";			}			if (e) {				/* Stash the error and try another address */				error_errno_val(&c->err, e, "%s", syscall);				start_connecting(c);			}			/* Strange, no error.  Continue to poll. */			else if (!watched_fd_set_interest(c->watched_fd,						  WATCHED_FD_OUT, &c->err)) {				simple_socket_wake_all(&c->socket->base);			}		}	}}
开发者ID:dpw,项目名称:molerat,代码行数:53,


示例7: zmq_assert

void zmq::tcp_connecter_t::timer_event (int id_){    zmq_assert (id_ == reconnect_timer_id || id_ == connect_timer_id);    if (id_ == connect_timer_id) {        connect_timer_started = false;        rm_handle ();        close ();        add_reconnect_timer ();    } else if (id_ == reconnect_timer_id) {        reconnect_timer_started = false;        start_connecting ();    }}
开发者ID:cuijw,项目名称:libzmq,代码行数:13,


示例8: terminate

void zmq::session_base_t::detached (){    //  Transient session self-destructs after peer disconnects.    if (!connect) {        terminate ();        return;    }    //  Reconnect.    start_connecting (true);    //  For subscriber sockets we hiccup the inbound pipe, which will cause    //  the socket object to resend all the subscriptions.    if (pipe && (options.type == ZMQ_SUB || options.type == ZMQ_XSUB))        pipe->hiccup ();  }
开发者ID:agilehands,项目名称:libzmq,代码行数:16,


示例9: zmq_assert

void zmq::ipc_connecter_t::timer_event (int id_){    zmq_assert (id_ == reconnect_timer_id);    timer_started = false;    start_connecting ();}
开发者ID:401885064,项目名称:libzmq,代码行数:6,


示例10: start_connecting

void zmq::connect_session_t::process_plug (){    //  Start connection process immediately.    start_connecting (false);}
开发者ID:888,项目名称:zeromq2-x,代码行数:5,


示例11: zmq_assert

void zmq::tcp_connecter_t::timer_event (int id_){    zmq_assert (id_ == reconnect_timer_id);    wait = false;    start_connecting ();}
开发者ID:kaka11chen,项目名称:zeromq3-x,代码行数:6,


示例12: start_connecting

void zmq::session_base_t::process_plug (){    if (active)        start_connecting (false);}
开发者ID:HJoYer,项目名称:libzmq,代码行数:5,


示例13: start_connecting

void zmq::zmq_connecter_t::timer_event (){    wait = false;    start_connecting ();}
开发者ID:SorinS,项目名称:zeromq2,代码行数:5,



注:本文中的start_connecting函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ start_critical_timings函数代码示例
C++ start_command函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。