Deleted Added
1
2/*
3 * Copyright (C) Igor Sysoev
4 * Copyright (C) NGINX, Inc.
5 */
6
7#include <nxt_main.h>
8
9
10nxt_conn_io_t nxt_unix_conn_io = {
11 .connect = nxt_conn_io_connect,
12 .accept = nxt_conn_io_accept,
13
14 .read = nxt_conn_io_read,
15 .recvbuf = nxt_conn_io_recvbuf,
16 .recv = nxt_conn_io_recv,
17
18 .write = nxt_conn_io_write,
19 .sendbuf = nxt_conn_io_sendbuf,
20
21#if (NXT_HAVE_LINUX_SENDFILE)
22 .old_sendbuf = nxt_linux_event_conn_io_sendfile,
23#elif (NXT_HAVE_FREEBSD_SENDFILE)
24 .old_sendbuf = nxt_freebsd_event_conn_io_sendfile,
25#elif (NXT_HAVE_MACOSX_SENDFILE)
26 .old_sendbuf = nxt_macosx_event_conn_io_sendfile,
27#elif (NXT_HAVE_SOLARIS_SENDFILEV)
28 .old_sendbuf = nxt_solaris_event_conn_io_sendfilev,
29#elif (NXT_HAVE_AIX_SEND_FILE)
30 .old_sendbuf = nxt_aix_event_conn_io_send_file,
31#elif (NXT_HAVE_HPUX_SENDFILE)
32 .old_sendbuf = nxt_hpux_event_conn_io_sendfile,
33#else
34 .old_sendbuf = nxt_event_conn_io_sendbuf,
35#endif
36
37 .writev = nxt_event_conn_io_writev,
38 .send = nxt_event_conn_io_send,
39};
40
41
42nxt_conn_t *
43nxt_conn_create(nxt_mp_t *mp, nxt_task_t *task)
44{
45 nxt_conn_t *c;
46 nxt_thread_t *thr;

--- 50 unchanged lines hidden (view full) ---

97 task->thread->engine->connections--;
98
99 mp = c->mem_pool;
100 nxt_mp_release(mp);
101}
102
103
104void
105nxt_conn_timer(nxt_event_engine_t *engine, nxt_conn_t *c,
106 const nxt_conn_state_t *state, nxt_timer_t *timer)
107{
108 nxt_msec_t value;
109
110 if (state->timer_value != NULL) {
111 value = state->timer_value(c, state->timer_data);
112

--- 73 unchanged lines hidden ---