Home
last modified time | relevance | path

Searched refs:c (Results 1 – 25 of 105) sorted by relevance

12345

/unit/auto/
H A Dsources7 src/nxt_lib.c \
8 src/nxt_gmtime.c \
9 src/nxt_errno.c \
10 src/nxt_time.c \
11 src/nxt_malloc.c \
12 src/nxt_file.c \
14 src/nxt_socket.c \
25 src/nxt_port.c \
26 src/nxt_dyld.c \
30 src/nxt_mp.c \
[all …]
/unit/src/
H A Dnxt_conn_read.c17 c->socket.fd, c->socket.read_ready); in nxt_conn_wait()
24 c->socket.task, c, c->socket.data); in nxt_conn_wait()
31 nxt_conn_timer(engine, c, state, &c->read_timer); in nxt_conn_wait()
46 c = obj; in nxt_conn_io_read()
49 c->socket.fd, c->socket.read_ready, c->socket.closed, in nxt_conn_io_read()
50 c->socket.error, c->block_read); in nxt_conn_io_read()
52 if (c->socket.error != 0 || c->block_read) { in nxt_conn_io_read()
62 c->socket.read_handler = c->io->read; in nxt_conn_io_read()
69 n = c->io->recvbuf(c, c->read); in nxt_conn_io_read()
114 nxt_conn_timer(engine, c, state, &c->read_timer); in nxt_conn_io_read()
[all …]
H A Dnxt_conn_connect.c19 c = obj; in nxt_conn_sys_socket()
22 c->socket.write_work_queue = c->write_work_queue; in nxt_conn_sys_socket()
42 c = obj; in nxt_conn_io_connect()
46 switch (nxt_socket_connect(task, c->socket.fd, c->remote)) { in nxt_conn_io_connect()
59 nxt_conn_timer(engine, c, state, &c->write_timer); in nxt_conn_io_connect()
73 nxt_work_queue_add(c->write_work_queue, handler, task, c, data); in nxt_conn_io_connect()
93 c->sendfile = 1; in nxt_conn_socket()
125 nxt_conn_t *c; in nxt_conn_connect_test() local
127 c = obj; in nxt_conn_connect_test()
156 c = obj; in nxt_conn_connect_error()
[all …]
H A Dnxt_conn.c45 nxt_conn_t *c; in nxt_conn_create() local
57 c->socket.log = &c->log; in nxt_conn_create()
70 c->task.log = &c->log; in nxt_conn_create()
71 c->task.ident = c->log.ident; in nxt_conn_create()
72 c->socket.task = &c->task; in nxt_conn_create()
73 c->read_timer.task = &c->task; in nxt_conn_create()
74 c->write_timer.task = &c->task; in nxt_conn_create()
83 nxt_conn_timer_init(&c->read_timer, c, c->socket.read_work_queue); in nxt_conn_create()
84 nxt_conn_timer_init(&c->write_timer, c, c->socket.write_work_queue); in nxt_conn_create()
88 return c; in nxt_conn_create()
[all …]
H A Dnxt_conn_close.c31 c->socket.fd, c->socket.timedout); in nxt_conn_close()
37 c->write = NULL; in nxt_conn_close()
61 if (c->socket.error == 0 && !c->socket.closed && !c->socket.shutdown) { in nxt_conn_close()
70 nxt_work_queue_add(wq, handler, c->socket.task, c, engine); in nxt_conn_close()
77 nxt_conn_t *c; in nxt_conn_shutdown_handler() local
80 c = obj; in nxt_conn_shutdown_handler()
101 c = obj; in nxt_conn_close_handler()
120 c->socket.fd = -1; in nxt_conn_close_handler()
125 task, c, c->socket.data); in nxt_conn_close_handler()
140 nxt_conn_t *c; in nxt_conn_close_timer_handler() local
[all …]
H A Dnxt_event_conn_job_sendfile.c47 c = obj; in nxt_event_conn_job_sendfile_start()
54 c->write_state->error_handler(task, c, NULL); in nxt_event_conn_job_sendfile_start()
59 c->socket.error_handler = c->write_state->error_handler; in nxt_event_conn_job_sendfile_start()
61 jbs->job.data = c; in nxt_event_conn_job_sendfile_start()
105 c = data; in nxt_event_conn_job_sendfile_handler()
113 ret = c->io->old_sendbuf(c, b, jbs->limit); in nxt_event_conn_job_sendfile_handler()
172 c = data; in nxt_event_conn_job_sendfile_return()
178 c->sent += sent; in nxt_event_conn_job_sendfile_return()
215 nxt_conn_timer(task->thread->engine, c, c->write_state, in nxt_event_conn_job_sendfile_return()
223 task, c, c->socket.data); in nxt_event_conn_job_sendfile_return()
[all …]
H A Dnxt_parse.c18 u_char c; in nxt_int_parse() local
32 c = c - '0'; in nxt_int_parse()
64 u_char c; in nxt_size_t_parse() local
78 c = c - '0'; in nxt_size_t_parse()
183 c = c - '0'; in nxt_off_t_parse()
232 c = *p; in nxt_str_int_parse()
235 c = c - '0'; in nxt_str_int_parse()
280 c = *p; in nxt_number_parse()
287 c = c - '0'; in nxt_number_parse()
324 c = *p; in nxt_number_parse()
[all …]
H A Dnxt_gnutls.c326 nxt_gnutls_conn_handshake(thr, c, c->socket.data); in nxt_gnutls_conn_init()
332 c->read_state->error_handler, c, c->socket.data); in nxt_gnutls_conn_init()
358 c = data; in nxt_gnutls_pull()
379 c = data; in nxt_gnutls_push()
405 c = data; in nxt_gnutls_vec_push()
433 c = obj; in nxt_gnutls_conn_handshake()
478 c = obj; in nxt_gnutls_conn_io_read()
483 b = c->read; in nxt_gnutls_conn_io_read()
580 c = obj; in nxt_gnutls_conn_io_shutdown()
590 if (c->socket.timedout || c->socket.error != 0) { in nxt_gnutls_conn_io_shutdown()
[all …]
H A Dnxt_cyassl.c24 nxt_event_conn_t *c);
217 nxt_cyassl_conn_handshake(thr, c, c->socket.data); in nxt_cyassl_conn_init()
223 c->read_state->error_handler, c, c->socket.data); in nxt_cyassl_conn_init()
249 c = data; in nxt_cyassl_io_recv()
277 c = data; in nxt_cyassl_io_send()
303 c = obj; in nxt_cyassl_conn_handshake()
349 c = obj; in nxt_cyassl_conn_io_read()
354 b = c->read; in nxt_cyassl_conn_io_read()
456 c = obj; in nxt_cyassl_conn_io_shutdown()
471 c->write_state->close_handler, c, data); in nxt_cyassl_conn_io_shutdown()
[all …]
H A Dnxt_sha1.c23 ctx->c = 0x98badcfe; in nxt_sha1_init()
104 result[10] = (u_char) (ctx->c >> 8); in nxt_sha1_final()
105 result[11] = (u_char) ctx->c; in nxt_sha1_final()
125 #define F1(b, c, d) (((b) & (c)) | ((~(b)) & (d))) argument
126 #define F2(b, c, d) ((b) ^ (c) ^ (d)) argument
127 #define F3(b, c, d) (((b) & (c)) | ((b) & (d)) | ((c) & (d))) argument
158 uint32_t a, b, c, d, e, temp; in nxt_sha1_body() local
168 c = ctx->c; in nxt_sha1_body()
175 saved_c = c; in nxt_sha1_body()
280 c += saved_c; in nxt_sha1_body()
[all …]
H A Dnxt_linux_sendfile.c113 c->socket.write_ready = 0; in nxt_linux_event_conn_io_sendfile()
120 c->socket.error = err; in nxt_linux_event_conn_io_sendfile()
135 c->socket.write_ready = 0; in nxt_linux_event_conn_io_sendfile()
159 c->socket.write_ready = 0; in nxt_linux_send()
166 c->socket.error = err; in nxt_linux_send()
180 c->socket.write_ready = 0; in nxt_linux_send()
203 n = sendmsg(c->socket.fd, &msg, flags); in nxt_linux_sendmsg()
208 c->socket.fd, niov, flags, n); in nxt_linux_sendmsg()
214 c->socket.write_ready = 0; in nxt_linux_sendmsg()
221 c->socket.error = err; in nxt_linux_sendmsg()
[all …]
H A Dnxt_conn_write.c25 c = obj; in nxt_conn_io_write()
28 c->socket.fd, c->socket.error, c->block_write); in nxt_conn_io_write()
30 if (c->socket.error != 0 || c->block_write) { in nxt_conn_io_write()
34 if (!c->socket.write_ready || c->write == NULL) { in nxt_conn_io_write()
41 c->socket.error_handler = c->write_state->error_handler; in nxt_conn_io_write()
43 b = c->write; in nxt_conn_io_write()
51 sb.tls = c->u.tls; in nxt_conn_io_write()
113 nxt_conn_timer(engine, c, c->write_state, &c->write_timer); in nxt_conn_io_write()
149 nxt_conn_t *c; in nxt_conn_write_timer_handler() local
157 c->delayed = 0; in nxt_conn_write_timer_handler()
[all …]
H A Dnxt_conn.h77 ssize_t (*writev)(nxt_conn_t *c,
229 nxt_conn_t *c);
241 nxt_conn_t *c);
245 void nxt_conn_wait(nxt_conn_t *c);
248 ssize_t nxt_conn_io_recvbuf(nxt_conn_t *c, nxt_buf_t *b);
259 size_t nxt_event_conn_write_limit(nxt_conn_t *c);
261 nxt_conn_t *c, size_t sent);
267 nxt_conn_t *c);
272 c->socket.task, c, c->socket.data)
282 c->socket.task, c, c->socket.data); \
[all …]
H A Dnxt_conn_accept.c145 c = lev->next; in nxt_conn_io_accept()
168 c->socket.fd = s; in nxt_conn_io_accept()
200 c->listen = lev; in nxt_conn_accept()
213 &c->task, c, lev); in nxt_conn_accept()
217 &c->task, c, lev); in nxt_conn_accept()
232 nxt_conn_t *c; in nxt_conn_accept_next() local
234 c = lev->next; in nxt_conn_accept_next()
236 if (c == NULL) { in nxt_conn_accept_next()
244 return c; in nxt_conn_accept_next()
292 c->socket.fd, c->socket.read_ready); in nxt_conn_accept_close_idle_handler()
[all …]
H A Dnxt_stream_source.c17 nxt_event_conn_t *c);
58 stream->conn = c; in nxt_stream_source_connect()
97 c = obj; in nxt_stream_source_connected()
113 c->io->read, task, c, stream); in nxt_stream_source_connected()
115 c->io->write(task, c, stream); in nxt_stream_source_connected()
157 c = obj; in nxt_stream_source_write_ready()
174 c = obj; in nxt_stream_source_read_ready()
248 c = obj; in nxt_stream_source_read_done()
307 in = c->read; in nxt_stream_source_process_buffers()
406 c = obj; in nxt_stream_source_refused()
[all …]
H A Dnxt_port_memory_int.h98 ((m[FREE_IDX(c)] & FREE_MASK(c)) == 0)
101 nxt_port_mmap_set_chunk_busy(nxt_free_map_t *m, nxt_chunk_id_t c);
141 start = FREE_IDX(*c); in nxt_port_mmap_get_free_chunk()
142 mask = default_mask << ((*c) % FREE_BITS); in nxt_port_mmap_get_free_chunk()
157 *c = chunk; in nxt_port_mmap_get_free_chunk()
170 nxt_atomic_and_fetch(m + FREE_IDX(c), ~FREE_MASK(c)); in nxt_port_mmap_set_chunk_busy()
180 f = m + FREE_IDX(c); in nxt_port_mmap_chk_set_chunk_busy()
182 while ( (*f & FREE_MASK(c)) != 0 ) { in nxt_port_mmap_chk_set_chunk_busy()
184 free_val = *f | FREE_MASK(c); in nxt_port_mmap_chk_set_chunk_busy()
185 busy_val = free_val & ~FREE_MASK(c); in nxt_port_mmap_chk_set_chunk_busy()
[all …]
H A Dnxt_h1proto.c220 c = obj; in nxt_http_conn_init()
294 n = c->io->recv(c, b->mem.pos, 16, MSG_PEEK); in nxt_http_idle_io_read_handler()
318 c = obj; in nxt_http_conn_test()
429 n = c->io->recvbuf(c, b); in nxt_h1p_idle_io_read_handler()
449 c = obj; in nxt_h1p_conn_proto_init()
476 c = obj; in nxt_h1p_conn_request_init()
554 c = obj; in nxt_h1p_conn_request_header_parse()
1025 c = obj; in nxt_h1p_conn_request_body_read()
1719 c = obj; in nxt_h1p_conn_sent()
2058 c->io->shutdown(task, c, NULL); in nxt_h1p_closing()
[all …]
H A Dnxt_aix_send_file.c35 nhd = nxt_sendbuf_mem_coalesce(c->socket.task, &sb); in nxt_aix_event_conn_io_send_file()
42 return nxt_event_conn_io_writev(c, hd, nhd); in nxt_aix_event_conn_io_send_file()
50 return nxt_event_conn_io_writev(c, hd, nhd); in nxt_aix_event_conn_io_send_file()
56 ntr = nxt_sendbuf_mem_coalesce(c->socket.task, &sb); in nxt_aix_event_conn_io_send_file()
77 n = send_file(&c->socket.fd, &sfp, 0); in nxt_aix_event_conn_io_send_file()
82 nxt_debug(c->socket.task, "send_file(%d): %d sent:%O", in nxt_aix_event_conn_io_send_file()
83 c->socket.fd, n, sent); in nxt_aix_event_conn_io_send_file()
96 c->socket.write_ready = 0; in nxt_aix_event_conn_io_send_file()
103 c->socket.error = err; in nxt_aix_event_conn_io_send_file()
112 nxt_debug(c->socket.task, "sendfile() %E", err); in nxt_aix_event_conn_io_send_file()
[all …]
H A Dnxt_macosx_sendfile.c48 nhd = nxt_sendbuf_mem_coalesce(c->socket.task, &sb); in nxt_macosx_event_conn_io_sendfile()
55 return nxt_event_conn_io_writev(c, hd, nhd); in nxt_macosx_event_conn_io_sendfile()
64 return nxt_event_conn_io_writev(c, hd, nhd); in nxt_macosx_event_conn_io_sendfile()
69 ntr = nxt_sendbuf_mem_coalesce(c->socket.task, &sb); in nxt_macosx_event_conn_io_sendfile()
104 nxt_log_debug(c->socket.log, in nxt_macosx_event_conn_io_sendfile()
109 n = nxt_sys_sendfile(fb->file->fd, c->socket.fd, in nxt_macosx_event_conn_io_sendfile()
120 c->socket.write_ready = 0; in nxt_macosx_event_conn_io_sendfile()
127 c->socket.error = err; in nxt_macosx_event_conn_io_sendfile()
136 nxt_debug(c->socket.task, "sendfile() %E", err); in nxt_macosx_event_conn_io_sendfile()
142 nxt_log(c->socket.task, NXT_LOG_ERR, in nxt_macosx_event_conn_io_sendfile()
[all …]
H A Dnxt_freebsd_sendfile.c33 nxt_freebsd_event_conn_io_sendfile(nxt_event_conn_t *c, nxt_buf_t *b, in nxt_freebsd_event_conn_io_sendfile() argument
53 nhd = nxt_sendbuf_mem_coalesce(c->socket.task, &sb); in nxt_freebsd_event_conn_io_sendfile()
60 return nxt_event_conn_io_writev(c, hd, nhd); in nxt_freebsd_event_conn_io_sendfile()
68 return nxt_event_conn_io_writev(c, hd, nhd); in nxt_freebsd_event_conn_io_sendfile()
73 ntr = nxt_sendbuf_mem_coalesce(c->socket.task, &sb); in nxt_freebsd_event_conn_io_sendfile()
111 c->socket.write_ready = 0; in nxt_freebsd_event_conn_io_sendfile()
118 c->socket.error = err; in nxt_freebsd_event_conn_io_sendfile()
119 nxt_log(c->socket.task, nxt_socket_error_level(err), in nxt_freebsd_event_conn_io_sendfile()
127 nxt_debug(c->socket.task, "sendfile() %E", err); in nxt_freebsd_event_conn_io_sendfile()
132 nxt_log(c->socket.task, NXT_LOG_ERR, in nxt_freebsd_event_conn_io_sendfile()
[all …]
H A Dnxt_hpux_sendfile.c12 ssize_t nxt_hpux_event_conn_io_sendfile(nxt_event_conn_t *c, nxt_buf_t *b,
51 nhd = nxt_sendbuf_mem_coalesce(c->socket.task, &sb); in nxt_hpux_event_conn_io_sendfile()
58 return nxt_event_conn_io_writev(c, iov, nhd); in nxt_hpux_event_conn_io_sendfile()
66 return nxt_event_conn_io_writev(c, iov, nhd); in nxt_hpux_event_conn_io_sendfile()
72 ntr = nxt_sendbuf_mem_coalesce(c->socket.task, &sb); in nxt_hpux_event_conn_io_sendfile()
105 nxt_debug(c->socket.task, "sendfile(): %uz", n); in nxt_hpux_event_conn_io_sendfile()
111 c->socket.write_ready = 0; in nxt_hpux_event_conn_io_sendfile()
118 c->socket.error = err; in nxt_hpux_event_conn_io_sendfile()
119 nxt_log(c->socket.task, nxt_socket_error_level(err), in nxt_hpux_event_conn_io_sendfile()
127 nxt_debug(c->socket.task, "sendfile() %E", err); in nxt_hpux_event_conn_io_sendfile()
[all …]
H A Dnxt_openssl.c91 nxt_conn_t *c);
1189 tls->conn = c;
1209 nxt_openssl_conn_handshake(task, c, c->socket.data);
1216 task, c, c->socket.data);
1249 c = obj;
1275 state = (c->read_state != NULL) ? c->read_state : c->write_state;
1325 wq = (c->read_state != NULL) ? c->read_work_queue : c->write_work_queue;
1354 n = nxt_openssl_conn_test_error(c->socket.task, c, ret, err,
1434 c = obj;
1454 if (c->socket.timedout || c->socket.error != 0) {
[all …]
H A Dnxt_solaris_sendfilev.c25 nxt_solaris_event_conn_io_sendfilev(nxt_event_conn_t *c, nxt_buf_t *b, in nxt_solaris_event_conn_io_sendfilev() argument
36 if (c->sendfile == 0) { in nxt_solaris_event_conn_io_sendfilev()
38 return nxt_event_conn_io_sendbuf(c, b, limit); in nxt_solaris_event_conn_io_sendfilev()
45 nxt_debug(c->socket.task, "sendfilev(%d, %D)", c->socket.fd, nsfv); in nxt_solaris_event_conn_io_sendfilev()
52 n = sendfilev(c->socket.fd, sfv, nsfv, &sent); in nxt_solaris_event_conn_io_sendfilev()
56 nxt_debug(c->socket.task, "sendfilev(): %d sent:%uz", n, sent); in nxt_solaris_event_conn_io_sendfilev()
62 c->socket.write_ready = 0; in nxt_solaris_event_conn_io_sendfilev()
69 c->socket.error = err; in nxt_solaris_event_conn_io_sendfilev()
70 nxt_log(c->socket.task, nxt_socket_error_level(err), in nxt_solaris_event_conn_io_sendfilev()
76 nxt_debug(c->socket.task, "sendfilev() %E", err); in nxt_solaris_event_conn_io_sendfilev()
[all …]
H A Dnxt_string.h11 #define nxt_lowcase(c) \ argument
12 (u_char) ((c >= 'A' && c <= 'Z') ? c | 0x20 : c)
14 #define nxt_upcase(c) \ argument
15 (u_char) ((c >= 'a' && c <= 'z') ? c & ~0x20 : c)
17 #define nxt_isdigit(c) \ argument
18 ((u_char) ((c) - '0') <= 9)
40 #define nxt_memset(buf, c, length) \ argument
41 (void) memset(buf, c, length)
74 memchr((char *) s, c, length)
152 (((s)->length == 1) && ((s)->start[0] == c))
[all …]
/unit/test/
H A Dtest_tls_session.py93 assert True not in [c[-1] for c in clients], 'cache small all new'
95 clients_again = [self.connect(c[2], c[1]) for c in clients]
96 assert False in [c[-1] for c in clients_again], 'cache small no reuse'
103 assert True not in [c[-1] for c in clients], 'cache big all new'
105 clients_again = [self.connect(c[2], c[1]) for c in clients]
106 assert False not in [c[-1] for c in clients_again], 'cache big reuse'

12345