Lines Matching refs:socket

71     peer = nxt_conn_create(client->mem_pool, client->socket.task);  in nxt_conn_proxy_create()
80 client->socket.read_work_queue = &thr->engine->read_work_queue; in nxt_conn_proxy_create()
81 client->socket.write_work_queue = &thr->engine->write_work_queue; in nxt_conn_proxy_create()
82 peer->socket.read_work_queue = &thr->engine->read_work_queue; in nxt_conn_proxy_create()
83 peer->socket.write_work_queue = &thr->engine->write_work_queue; in nxt_conn_proxy_create()
85 peer->socket.data = client->socket.data; in nxt_conn_proxy_create()
153 nxt_debug(task, "conn proxy client first read fd:%d", client->socket.fd); in nxt_conn_proxy_client_buffer_alloc()
165 if (p->peer->socket.fd != -1) { in nxt_conn_proxy_client_buffer_alloc()
251 nxt_debug(task, "conn proxy connected fd:%d", peer->socket.fd); in nxt_conn_proxy_connected()
302 nxt_debug(task, "conn proxy peer read fd:%d", peer->socket.fd); in nxt_conn_proxy_peer_read()
346 nxt_debug(task, "conn proxy client read ready fd:%d", client->socket.fd); in nxt_conn_proxy_client_read_ready()
370 nxt_debug(task, "conn proxy peer read ready fd:%d", peer->socket.fd); in nxt_conn_proxy_peer_read_ready()
382 if (sink->socket.error != 0) { in nxt_conn_proxy_read_process()
384 sink->socket.fd, sink->socket.error); in nxt_conn_proxy_read_process()
386 nxt_conn_proxy_write_error(task, sink, sink->socket.data); in nxt_conn_proxy_read_process()
418 task, source, source->socket.data); in nxt_conn_proxy_read_process()
499 nxt_debug(task, "conn proxy read fd:%d", source->socket.fd); in nxt_conn_proxy_read()
501 if (!source->socket.closed) { in nxt_conn_proxy_read()
504 if (sink->socket.error == 0) { in nxt_conn_proxy_read()
533 nxt_debug(task, "conn proxy client write ready fd:%d", client->socket.fd); in nxt_conn_proxy_client_write_ready()
561 nxt_debug(task, "conn proxy peer write ready fd:%d", peer->socket.fd); in nxt_conn_proxy_peer_write_ready()
619 task, source, source->socket.data); in nxt_conn_proxy_write_process()
711 nxt_debug(task, "conn proxy close fd:%d", source->socket.fd); in nxt_conn_proxy_close()
740 nxt_debug(task, "conn proxy error fd:%d", c->socket.fd); in nxt_conn_proxy_error()
755 c->socket.timedout = 1; in nxt_conn_proxy_read_timeout()
756 c->socket.closed = 1; in nxt_conn_proxy_read_timeout()
758 nxt_debug(task, "conn proxy read timeout fd:%d", c->socket.fd); in nxt_conn_proxy_read_timeout()
760 nxt_conn_proxy_close(task, c, c->socket.data); in nxt_conn_proxy_read_timeout()
773 c->socket.timedout = 1; in nxt_conn_proxy_write_timeout()
774 c->socket.closed = 1; in nxt_conn_proxy_write_timeout()
776 nxt_debug(task, "conn proxy write timeout fd:%d", c->socket.fd); in nxt_conn_proxy_write_timeout()
778 nxt_conn_proxy_close(task, c, c->socket.data); in nxt_conn_proxy_write_timeout()
785 return nxt_value_at(nxt_msec_t, c->socket.data, data); in nxt_conn_proxy_timeout_value()
798 nxt_debug(task, "conn proxy refused fd:%d", peer->socket.fd); in nxt_conn_proxy_refused()
808 nxt_socket_close(task, peer->socket.fd); in nxt_conn_proxy_refused()
809 peer->socket.fd = -1; in nxt_conn_proxy_refused()
810 peer->socket.error = 0; in nxt_conn_proxy_refused()
832 p = peer->socket.data; in nxt_conn_proxy_reconnect_handler()
834 if (p->client->socket.closed) { in nxt_conn_proxy_reconnect_handler()
856 nxt_debug(source->socket.task, in nxt_conn_proxy_shutdown()
858 source->socket.fd, source->socket.closed, source->socket.error); in nxt_conn_proxy_shutdown()
860 nxt_debug(sink->socket.task, in nxt_conn_proxy_shutdown()
862 sink->socket.fd, sink->socket.closed, sink->socket.error); in nxt_conn_proxy_shutdown()
869 if (sink->socket.error == 0 && !sink->socket.closed) { in nxt_conn_proxy_shutdown()
870 sink->socket.shutdown = 1; in nxt_conn_proxy_shutdown()
871 nxt_socket_shutdown(task, sink->socket.fd, SHUT_WR); in nxt_conn_proxy_shutdown()
874 if (sink->socket.error != 0 in nxt_conn_proxy_shutdown()
875 || (sink->socket.closed && source->write == NULL)) in nxt_conn_proxy_shutdown()
882 nxt_debug(source->socket.task, "free source buffer"); in nxt_conn_proxy_shutdown()
899 nxt_debug(task, "conn proxy read error fd:%d", c->socket.fd); in nxt_conn_proxy_read_error()
914 nxt_debug(task, "conn proxy write error fd:%d", sink->socket.fd); in nxt_conn_proxy_write_error()
921 nxt_fd_event_block_read(task->thread->engine, &source->socket); in nxt_conn_proxy_write_error()
947 nxt_debug(p->client->socket.task, "conn proxy complete %d:%d", in nxt_conn_proxy_complete()
948 p->client->socket.fd, p->peer->socket.fd); in nxt_conn_proxy_complete()
955 if (p->client->socket.fd != -1) { in nxt_conn_proxy_complete()
961 if (p->peer->socket.fd != -1) { in nxt_conn_proxy_complete()
976 nxt_debug(p->client->socket.task, "conn proxy completion %d:%d:%d", in nxt_conn_proxy_completion()
977 p->retain, p->client->socket.fd, p->peer->socket.fd); in nxt_conn_proxy_completion()