Lines Matching refs:client

60 nxt_conn_proxy_create(nxt_conn_t *client)  in nxt_conn_proxy_create()  argument
66 p = nxt_mp_zget(client->mem_pool, sizeof(nxt_conn_proxy_t)); in nxt_conn_proxy_create()
71 peer = nxt_conn_create(client->mem_pool, client->socket.task); in nxt_conn_proxy_create()
78 client->read_work_queue = &thr->engine->read_work_queue; in nxt_conn_proxy_create()
79 client->write_work_queue = &thr->engine->write_work_queue; 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()
85 peer->socket.data = client->socket.data; in nxt_conn_proxy_create()
87 peer->read_work_queue = client->read_work_queue; in nxt_conn_proxy_create()
88 peer->write_work_queue = client->write_work_queue; in nxt_conn_proxy_create()
89 peer->read_timer.work_queue = client->read_work_queue; in nxt_conn_proxy_create()
90 peer->write_timer.work_queue = client->write_work_queue; in nxt_conn_proxy_create()
92 p->client = client; in nxt_conn_proxy_create()
124 p->client->read_state = &nxt_conn_proxy_client_wait_state; in nxt_conn_proxy()
126 nxt_conn_wait(p->client); in nxt_conn_proxy()
147 nxt_conn_t *client; in nxt_conn_proxy_client_buffer_alloc() local
150 client = obj; in nxt_conn_proxy_client_buffer_alloc()
153 nxt_debug(task, "conn proxy client first read fd:%d", client->socket.fd); in nxt_conn_proxy_client_buffer_alloc()
155 b = nxt_buf_mem_alloc(client->mem_pool, p->client_buffer_size, 0); in nxt_conn_proxy_client_buffer_alloc()
163 client->read = b; in nxt_conn_proxy_client_buffer_alloc()
173 client->read_state = &nxt_conn_proxy_client_read_state; in nxt_conn_proxy_client_buffer_alloc()
183 client->read_state = &nxt_conn_proxy_client_first_read_state; in nxt_conn_proxy_client_buffer_alloc()
186 nxt_conn_read(task->thread->engine, client); in nxt_conn_proxy_client_buffer_alloc()
207 nxt_conn_t *client; in nxt_conn_proxy_peer_connect() local
210 client = obj; in nxt_conn_proxy_peer_connect()
220 client->read_state = &nxt_conn_proxy_client_read_state; in nxt_conn_proxy_peer_connect()
245 nxt_conn_t *client, *peer; in nxt_conn_proxy_connected() local
256 nxt_conn_tcp_nodelay_on(task, p->client); in nxt_conn_proxy_connected()
266 client = p->client; in nxt_conn_proxy_connected()
268 client->read_state = &nxt_conn_proxy_client_read_state; in nxt_conn_proxy_connected()
269 client->write_state = &nxt_conn_proxy_client_write_state; in nxt_conn_proxy_connected()
274 nxt_conn_proxy_read_process(task, p, client, peer); in nxt_conn_proxy_connected()
314 p->client->write_state = &nxt_conn_proxy_client_write_state; in nxt_conn_proxy_peer_read()
340 nxt_conn_t *client; in nxt_conn_proxy_client_read_ready() local
343 client = obj; in nxt_conn_proxy_client_read_ready()
346 nxt_debug(task, "conn proxy client read ready fd:%d", client->socket.fd); in nxt_conn_proxy_client_read_ready()
348 nxt_conn_proxy_read_process(task, p, client, p->peer); in nxt_conn_proxy_client_read_ready()
372 nxt_conn_proxy_read_process(task, p, peer, p->client); in nxt_conn_proxy_peer_read_ready()
502 sink = (source == p->client) ? p->peer : p->client; in nxt_conn_proxy_read()
527 nxt_conn_t *client; in nxt_conn_proxy_client_write_ready() local
530 client = obj; in nxt_conn_proxy_client_write_ready()
533 nxt_debug(task, "conn proxy client write ready fd:%d", client->socket.fd); in nxt_conn_proxy_client_write_ready()
535 nxt_conn_proxy_write_process(task, p, client, p->peer); in nxt_conn_proxy_client_write_ready()
563 nxt_conn_proxy_write_process(task, p, peer, p->client); in nxt_conn_proxy_peer_write_ready()
713 sink = (source == p->client) ? p->peer : p->client; in nxt_conn_proxy_close()
834 if (p->client->socket.closed) { in nxt_conn_proxy_reconnect_handler()
885 b = (source == p->client) ? p->client_buffer : p->peer_buffer; in nxt_conn_proxy_shutdown()
920 source = (sink == p->client) ? p->peer : p->client; 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()
957 p->client->write_state = &nxt_conn_proxy_close_state; in nxt_conn_proxy_complete()
958 nxt_conn_close(engine, p->client); 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()
982 nxt_mp_free(p->client->mem_pool, p->client_buffer); in nxt_conn_proxy_completion()
983 nxt_mp_free(p->client->mem_pool, p->peer_buffer); in nxt_conn_proxy_completion()