• Home
  • Raw
  • Download

Lines Matching refs:conn_

104     : conn_(loop, -1, nullptr, mcpool, write_timeout, read_timeout, {}, {},  in MemcachedConnection()
118 MemcachedConnection::~MemcachedConnection() { conn_.disconnect(); } in ~MemcachedConnection()
143 conn_.disconnect(); in disconnect()
152 assert(conn_.fd == -1); in initiate_connection()
159 conn_.set_ssl(ssl); in initiate_connection()
160 conn_.tls.client_session_cache = &tls_session_cache_; in initiate_connection()
163 conn_.fd = util::create_nonblock_socket(addr_->su.storage.ss_family); in initiate_connection()
165 if (conn_.fd == -1) { in initiate_connection()
173 rv = connect(conn_.fd, &addr_->su.sa, addr_->len); in initiate_connection()
178 close(conn_.fd); in initiate_connection()
179 conn_.fd = -1; in initiate_connection()
186 SSL_set_tlsext_host_name(conn_.tls.ssl, sni_name_.c_str()); in initiate_connection()
191 SSL_set_session(conn_.tls.ssl, session); in initiate_connection()
195 conn_.prepare_client_handshake(); in initiate_connection()
202 ev_io_set(&conn_.wev, conn_.fd, EV_WRITE); in initiate_connection()
203 ev_io_set(&conn_.rev, conn_.fd, EV_READ); in initiate_connection()
205 ev_set_cb(&conn_.wev, connectcb); in initiate_connection()
207 conn_.wlimit.startw(); in initiate_connection()
208 ev_timer_again(conn_.loop, &conn_.wt); in initiate_connection()
214 auto sock_error = util::get_socket_error(conn_.fd); in connected()
222 conn_.wlimit.stopw(); in connected()
231 conn_.rlimit.startw(); in connected()
233 ev_set_cb(&conn_.wev, writecb); in connected()
235 if (conn_.tls.ssl) { in connected()
236 conn_.again_rt(); in connected()
244 ev_timer_stop(conn_.loop, &conn_.wt); in connected()
262 conn_.last_read = ev_now(conn_.loop); in tls_handshake()
264 auto rv = conn_.tls_handshake(); in tls_handshake()
281 tls::check_cert(conn_.tls.ssl, addr_, sni_name_) != 0) { in tls_handshake()
286 ev_timer_stop(conn_.loop, &conn_.rt); in tls_handshake()
287 ev_timer_stop(conn_.loop, &conn_.wt); in tls_handshake()
304 conn_.last_read = ev_now(conn_.loop); in write_tls()
321 auto nwrite = conn_.write_tls(buf.data(), p - std::begin(buf)); in write_tls()
332 conn_.wlimit.stopw(); in write_tls()
333 ev_timer_stop(conn_.loop, &conn_.wt); in write_tls()
343 conn_.last_read = ev_now(conn_.loop); in read_tls()
346 auto nread = conn_.read_tls(recvbuf_.last, recvbuf_.wleft()); in read_tls()
371 conn_.last_read = ev_now(conn_.loop); in write_clear()
377 auto nwrite = conn_.writev_clear(iov.data(), iovcnt); in write_clear()
388 conn_.wlimit.stopw(); in write_clear()
389 ev_timer_stop(conn_.loop, &conn_.wt); in write_clear()
399 conn_.last_read = ev_now(conn_.loop); in read_clear()
402 auto nread = conn_.read_clear(recvbuf_.last, recvbuf_.wleft()); in read_clear()
558 ev_timer_stop(conn_.loop, &conn_.rt); in parse_packet()
661 ev_timer_stop(conn_.loop, &conn_.rt); in drain_send_queue()
662 } else if (!ev_is_active(&conn_.rt)) { in drain_send_queue()
663 conn_.again_rt(); in drain_send_queue()
717 if (conn_.fd == -1 && initiate_connection() != 0) { in add_request()
727 void MemcachedConnection::signal_write() { conn_.wlimit.startw(); } in signal_write()