Lines Matching refs:task

10 static void nxt_conn_proxy_client_buffer_alloc(nxt_task_t *task, void *obj,
12 static void nxt_conn_proxy_peer_connect(nxt_task_t *task, void *obj,
14 static void nxt_conn_proxy_connected(nxt_task_t *task, void *obj, void *data);
15 static void nxt_conn_proxy_peer_read(nxt_task_t *task, void *obj, void *data);
16 static void nxt_conn_proxy_client_read_ready(nxt_task_t *task, void *obj,
18 static void nxt_conn_proxy_peer_read_ready(nxt_task_t *task, void *obj,
20 static void nxt_conn_proxy_read_process(nxt_task_t *task, nxt_conn_proxy_t *p,
23 static void nxt_conn_proxy_read(nxt_task_t *task, void *obj, void *data);
24 static void nxt_conn_proxy_client_write_ready(nxt_task_t *task, void *obj,
26 static void nxt_conn_proxy_peer_write_ready(nxt_task_t *task, void *obj,
28 static void nxt_conn_proxy_write_process(nxt_task_t *task, nxt_conn_proxy_t *p,
31 static void nxt_conn_proxy_close(nxt_task_t *task, void *obj, void *data);
32 static void nxt_conn_proxy_error(nxt_task_t *task, void *obj, void *data);
33 static void nxt_conn_proxy_read_timeout(nxt_task_t *task, void *obj,
35 static void nxt_conn_proxy_write_timeout(nxt_task_t *task, void *obj,
38 static void nxt_conn_proxy_refused(nxt_task_t *task, void *obj, void *data);
39 static void nxt_conn_proxy_reconnect_handler(nxt_task_t *task, void *obj,
41 static void nxt_conn_proxy_shutdown(nxt_task_t *task, nxt_conn_proxy_t *p,
43 static void nxt_conn_proxy_read_error(nxt_task_t *task, void *obj, void *data);
44 static void nxt_conn_proxy_write_error(nxt_task_t *task, void *obj, void *data);
45 static void nxt_conn_proxy_complete(nxt_task_t *task, nxt_conn_proxy_t *p);
46 static void nxt_conn_proxy_completion(nxt_task_t *task, void *obj, void *data);
71 peer = nxt_conn_create(client->mem_pool, client->socket.task); in nxt_conn_proxy_create()
100 nxt_conn_proxy(nxt_task_t *task, nxt_conn_proxy_t *p) in nxt_conn_proxy() argument
117 nxt_conn_connect(task->thread->engine, peer); in nxt_conn_proxy()
144 nxt_conn_proxy_client_buffer_alloc(nxt_task_t *task, void *obj, void *data) in nxt_conn_proxy_client_buffer_alloc() argument
153 nxt_debug(task, "conn proxy client first read fd:%d", client->socket.fd); in nxt_conn_proxy_client_buffer_alloc()
158 nxt_conn_proxy_complete(task, p); in nxt_conn_proxy_client_buffer_alloc()
186 nxt_conn_read(task->thread->engine, client); in nxt_conn_proxy_client_buffer_alloc()
205 nxt_conn_proxy_peer_connect(nxt_task_t *task, void *obj, void *data) in nxt_conn_proxy_peer_connect() argument
224 nxt_conn_connect(task->thread->engine, p->peer); in nxt_conn_proxy_peer_connect()
243 nxt_conn_proxy_connected(nxt_task_t *task, void *obj, void *data) in nxt_conn_proxy_connected() argument
251 nxt_debug(task, "conn proxy connected fd:%d", peer->socket.fd); in nxt_conn_proxy_connected()
255 nxt_conn_tcp_nodelay_on(task, peer); in nxt_conn_proxy_connected()
256 nxt_conn_tcp_nodelay_on(task, p->client); in nxt_conn_proxy_connected()
274 nxt_conn_proxy_read_process(task, p, client, peer); in nxt_conn_proxy_connected()
293 nxt_conn_proxy_peer_read(nxt_task_t *task, void *obj, void *data) in nxt_conn_proxy_peer_read() argument
302 nxt_debug(task, "conn proxy peer read fd:%d", peer->socket.fd); in nxt_conn_proxy_peer_read()
307 nxt_conn_proxy_complete(task, p); in nxt_conn_proxy_peer_read()
324 nxt_conn_read(task->thread->engine, peer); in nxt_conn_proxy_peer_read()
338 nxt_conn_proxy_client_read_ready(nxt_task_t *task, void *obj, void *data) in nxt_conn_proxy_client_read_ready() argument
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()
362 nxt_conn_proxy_peer_read_ready(nxt_task_t *task, void *obj, void *data) in nxt_conn_proxy_peer_read_ready() argument
370 nxt_debug(task, "conn proxy peer read ready fd:%d", peer->socket.fd); in nxt_conn_proxy_peer_read_ready()
372 nxt_conn_proxy_read_process(task, p, peer, p->client); in nxt_conn_proxy_peer_read_ready()
377 nxt_conn_proxy_read_process(nxt_task_t *task, nxt_conn_proxy_t *p, in nxt_conn_proxy_read_process() argument
383 nxt_debug(task, "conn proxy sink fd:%d error:%d", in nxt_conn_proxy_read_process()
386 nxt_conn_proxy_write_error(task, sink, sink->socket.data); in nxt_conn_proxy_read_process()
401 nxt_conn_proxy_complete(task, p); in nxt_conn_proxy_read_process()
418 task, source, source->socket.data); in nxt_conn_proxy_read_process()
427 nxt_conn_write(task->thread->engine, sink); in nxt_conn_proxy_read_process()
491 nxt_conn_proxy_read(nxt_task_t *task, void *obj, void *data) in nxt_conn_proxy_read() argument
499 nxt_debug(task, "conn proxy read fd:%d", source->socket.fd); in nxt_conn_proxy_read()
505 nxt_conn_read(task->thread->engine, source); in nxt_conn_proxy_read()
525 nxt_conn_proxy_client_write_ready(nxt_task_t *task, void *obj, void *data) in nxt_conn_proxy_client_write_ready() argument
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()
553 nxt_conn_proxy_peer_write_ready(nxt_task_t *task, void *obj, void *data) in nxt_conn_proxy_peer_write_ready() argument
561 nxt_debug(task, "conn proxy peer write ready fd:%d", peer->socket.fd); in nxt_conn_proxy_peer_write_ready()
563 nxt_conn_proxy_write_process(task, p, peer, p->client); in nxt_conn_proxy_peer_write_ready()
568 nxt_conn_proxy_write_process(nxt_task_t *task, nxt_conn_proxy_t *p, in nxt_conn_proxy_write_process() argument
583 nxt_conn_proxy_shutdown(task, p, source, sink); in nxt_conn_proxy_write_process()
594 nxt_conn_proxy_complete(task, p); in nxt_conn_proxy_write_process()
609 nxt_conn_write(task->thread->engine, sink); in nxt_conn_proxy_write_process()
619 task, source, source->socket.data); in nxt_conn_proxy_write_process()
702 nxt_conn_proxy_close(nxt_task_t *task, void *obj, void *data) in nxt_conn_proxy_close() argument
711 nxt_debug(task, "conn proxy close fd:%d", source->socket.fd); in nxt_conn_proxy_close()
716 nxt_conn_proxy_shutdown(task, p, source, sink); in nxt_conn_proxy_close()
723 nxt_conn_proxy_complete(task, p); in nxt_conn_proxy_close()
732 nxt_conn_proxy_error(nxt_task_t *task, void *obj, void *data) in nxt_conn_proxy_error() argument
740 nxt_debug(task, "conn proxy error fd:%d", c->socket.fd); in nxt_conn_proxy_error()
742 nxt_conn_proxy_close(task, c, p); in nxt_conn_proxy_error()
747 nxt_conn_proxy_read_timeout(nxt_task_t *task, void *obj, void *data) in nxt_conn_proxy_read_timeout() argument
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()
765 nxt_conn_proxy_write_timeout(nxt_task_t *task, void *obj, void *data) in nxt_conn_proxy_write_timeout() argument
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()
790 nxt_conn_proxy_refused(nxt_task_t *task, void *obj, void *data) in nxt_conn_proxy_refused() argument
798 nxt_debug(task, "conn proxy refused fd:%d", peer->socket.fd); in nxt_conn_proxy_refused()
802 nxt_conn_proxy_complete(task, p); in nxt_conn_proxy_refused()
808 nxt_socket_close(task, peer->socket.fd); in nxt_conn_proxy_refused()
815 nxt_timer_add(task->thread->engine, &peer->write_timer, in nxt_conn_proxy_refused()
821 nxt_conn_proxy_reconnect_handler(nxt_task_t *task, void *obj, void *data) in nxt_conn_proxy_reconnect_handler() argument
829 nxt_debug(task, "conn proxy reconnect timer"); in nxt_conn_proxy_reconnect_handler()
835 nxt_conn_proxy_complete(task, p); in nxt_conn_proxy_reconnect_handler()
846 nxt_conn_connect(task->thread->engine, peer); in nxt_conn_proxy_reconnect_handler()
851 nxt_conn_proxy_shutdown(nxt_task_t *task, nxt_conn_proxy_t *p, in nxt_conn_proxy_shutdown() argument
856 nxt_debug(source->socket.task, in nxt_conn_proxy_shutdown()
860 nxt_debug(sink->socket.task, in nxt_conn_proxy_shutdown()
865 nxt_conn_proxy_complete(task, p); in nxt_conn_proxy_shutdown()
871 nxt_socket_shutdown(task, sink->socket.fd, SHUT_WR); in nxt_conn_proxy_shutdown()
878 nxt_conn_proxy_complete(task, p); in nxt_conn_proxy_shutdown()
882 nxt_debug(source->socket.task, "free source buffer"); in nxt_conn_proxy_shutdown()
891 nxt_conn_proxy_read_error(nxt_task_t *task, void *obj, void *data) in nxt_conn_proxy_read_error() argument
899 nxt_debug(task, "conn proxy read error fd:%d", c->socket.fd); in nxt_conn_proxy_read_error()
901 nxt_conn_proxy_close(task, c, p); in nxt_conn_proxy_read_error()
906 nxt_conn_proxy_write_error(nxt_task_t *task, void *obj, void *data) in nxt_conn_proxy_write_error() argument
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()
928 nxt_conn_proxy_complete(task, p); in nxt_conn_proxy_write_error()
941 nxt_conn_proxy_complete(nxt_task_t *task, nxt_conn_proxy_t *p) in nxt_conn_proxy_complete() argument
945 engine = task->thread->engine; in nxt_conn_proxy_complete()
947 nxt_debug(p->client->socket.task, "conn proxy complete %d:%d", in nxt_conn_proxy_complete()
970 nxt_conn_proxy_completion(nxt_task_t *task, void *obj, void *data) in nxt_conn_proxy_completion() argument
976 nxt_debug(p->client->socket.task, "conn proxy completion %d:%d:%d", in nxt_conn_proxy_completion()
985 p->completion_handler(task, p, NULL); in nxt_conn_proxy_completion()