Lines Matching refs:sink

21     nxt_conn_t *source, nxt_conn_t *sink);
29 nxt_conn_t *sink, nxt_conn_t *source);
42 nxt_conn_t *source, nxt_conn_t *sink);
378 nxt_conn_t *source, nxt_conn_t *sink) in nxt_conn_proxy_read_process() argument
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()
413 nxt_conn_proxy_write_add(sink, wb); in nxt_conn_proxy_read_process()
427 nxt_conn_write(task->thread->engine, sink); in nxt_conn_proxy_read_process()
493 nxt_conn_t *source, *sink; in nxt_conn_proxy_read() local
502 sink = (source == p->client) ? p->peer : p->client; in nxt_conn_proxy_read()
504 if (sink->socket.error == 0) { in nxt_conn_proxy_read()
569 nxt_conn_t *sink, nxt_conn_t *source) in nxt_conn_proxy_write_process() argument
573 while (sink->write != NULL) { in nxt_conn_proxy_write_process()
575 wb = sink->write; in nxt_conn_proxy_write_process()
581 sink->write = NULL; in nxt_conn_proxy_write_process()
582 nxt_buf_free(sink->mem_pool, wb); in nxt_conn_proxy_write_process()
583 nxt_conn_proxy_shutdown(task, p, source, sink); in nxt_conn_proxy_write_process()
591 rb = nxt_buf_mem_alloc(sink->mem_pool, 0, 0); in nxt_conn_proxy_write_process()
609 nxt_conn_write(task->thread->engine, sink); in nxt_conn_proxy_write_process()
614 sink->write = wb->next; in nxt_conn_proxy_write_process()
615 nxt_buf_free(sink->mem_pool, wb); in nxt_conn_proxy_write_process()
705 nxt_conn_t *source, *sink; in nxt_conn_proxy_close() local
713 sink = (source == p->client) ? p->peer : p->client; in nxt_conn_proxy_close()
715 if (sink->write == NULL) { in nxt_conn_proxy_close()
716 nxt_conn_proxy_shutdown(task, p, source, sink); in nxt_conn_proxy_close()
727 nxt_buf_chain_add(&sink->write, b); in nxt_conn_proxy_close()
852 nxt_conn_t *source, nxt_conn_t *sink) in nxt_conn_proxy_shutdown() argument
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()
908 nxt_conn_t *source, *sink; in nxt_conn_proxy_write_error() local
911 sink = obj; in nxt_conn_proxy_write_error()
914 nxt_debug(task, "conn proxy write error fd:%d", sink->socket.fd); in nxt_conn_proxy_write_error()
917 sink->write = NULL; in nxt_conn_proxy_write_error()
920 source = (sink == p->client) ? p->peer : p->client; in nxt_conn_proxy_write_error()