Home
last modified time | relevance | path

Searched refs:port (Results 1 – 25 of 50) sorted by relevance

12

/unit/src/
H A Dnxt_port.c26 nxt_port_t *port; in nxt_port_mp_cleanup() local
28 port = obj; in nxt_port_mp_cleanup()
53 nxt_port_t *port; in nxt_port_new() local
64 port->id = id; in nxt_port_new()
83 return port; in nxt_port_new()
92 nxt_debug(task, "port %p %d:%d close, type %d", port, port->pid, in nxt_port_close()
93 port->id, port->type); in nxt_port_close()
129 nxt_debug(task, "port %p %d:%d release, type %d", port, port->pid, in nxt_port_release()
130 port->id, port->type); in nxt_port_release()
562 port = pw->port; in nxt_port_post_handler()
[all …]
H A Dnxt_port_socket.c130 port->socket.fd = port->pair[1]; in nxt_port_write_enable()
206 (int) port->pid, (int) port->id, port->socket.fd, in nxt_port_socket_write2()
233 (int) port->pid, (int) port->id, port->socket.fd, in nxt_port_socket_write2()
705 port->socket.fd = port->pair[0]; in nxt_port_read_enable()
825 msg.port = port; in nxt_port_queue_read_handler()
852 (int) port->pid, (int) port->id, port->socket.fd, in nxt_port_queue_read_handler()
859 (int) port->pid, (int) port->id, port->socket.fd, in nxt_port_queue_read_handler()
875 (int) port->pid, (int) port->id, port->socket.fd, in nxt_port_queue_read_handler()
934 (int) port->pid, (int) port->id, port->socket.fd, in nxt_port_queue_read_handler()
941 (int) port->pid, (int) port->id, port->socket.fd, in nxt_port_queue_read_handler()
[all …]
H A Dnxt_port_hash.c20 nxt_port_t *port; in nxt_port_hash_test() local
23 port = data; in nxt_port_hash_test()
27 && pid_port_id->pid == port->pid in nxt_port_hash_test()
28 && pid_port_id->port_id == port->id) in nxt_port_hash_test()
69 pid_port.pid = port->pid; in nxt_port_hash_add()
70 pid_port.port_id = port->id; in nxt_port_hash_add()
74 lhq.value = port; in nxt_port_hash_add()
85 port->id, port->pid); in nxt_port_hash_add()
100 pid_port.pid = port->pid; in nxt_port_hash_remove()
101 pid_port.port_id = port->id; in nxt_port_hash_remove()
[all …]
H A Dnxt_port_rpc.c150 lhq.pool = port->mem_pool; in nxt_port_rpc_register_handler_ex()
168 nxt_port_inc_use(port); in nxt_port_rpc_register_handler_ex()
219 lhq.pool = port->mem_pool; in nxt_port_rpc_ex_set_peer()
312 nxt_port_t *port; in nxt_port_rpc_handler() local
318 port = msg->port; in nxt_port_rpc_handler()
323 lhq.pool = port->mem_pool; in nxt_port_rpc_handler()
362 nxt_port_use(task, port, -1); in nxt_port_rpc_handler()
379 lhq.pool = port->mem_pool; in nxt_port_rpc_remove_peer()
395 msg.port = port; in nxt_port_rpc_remove_peer()
467 lhq.pool = port->mem_pool; in nxt_port_rpc_cancel()
[all …]
H A Dnxt_http_route_addr.c48 nxt_str_null(&port); in nxt_http_route_addr_pattern_parse()
81 port.length = end - port.start; in nxt_http_route_addr_pattern_parse()
197 port.length = addr.start + addr.length - port.start; in nxt_http_route_addr_pattern_parse()
265 if (port.length == 0) { in nxt_http_route_addr_pattern_parse()
270 base->port.start = 0; in nxt_http_route_addr_pattern_parse()
276 delim = nxt_memchr(port.start, '-', port.length - 1); in nxt_http_route_addr_pattern_parse()
278 ret = nxt_int_parse(port.start, delim - port.start); in nxt_http_route_addr_pattern_parse()
285 ret = nxt_int_parse(delim + 1, port.start + port.length - (delim + 1)); in nxt_http_route_addr_pattern_parse()
290 base->port.end = ret; in nxt_http_route_addr_pattern_parse()
293 ret = nxt_int_parse(port.start, port.length); in nxt_http_route_addr_pattern_parse()
[all …]
H A Dnxt_port_rpc.h16 uint32_t nxt_port_rpc_register_handler(nxt_task_t *task, nxt_port_t *port,
19 void *nxt_port_rpc_register_handler_ex(nxt_task_t *task, nxt_port_t *port,
24 void nxt_port_rpc_ex_set_peer(nxt_task_t *task, nxt_port_t *port,
28 void nxt_port_rpc_remove_peer(nxt_task_t *task, nxt_port_t *port,
30 void nxt_port_rpc_cancel(nxt_task_t *task, nxt_port_t *port, uint32_t stream);
31 void nxt_port_rpc_close(nxt_task_t *task, nxt_port_t *port);
H A Dnxt_sockaddr.c762 if (port < 1 || port > 65535) { in nxt_sockaddr_inet6_parse()
832 if (port < 1 || port > 65535) { in nxt_sockaddr_inet_parse()
1024 port = jbs->resolve.port; in nxt_job_sockaddr_inet6_parse()
1031 if (port >= 1 && port <= 65535) { in nxt_job_sockaddr_inet6_parse()
1032 port = htons((in_port_t) port); in nxt_job_sockaddr_inet6_parse()
1093 if (port < 1 || port > 65535) { in nxt_job_sockaddr_inet_parse()
1098 port = htons((in_port_t) port); in nxt_job_sockaddr_inet_parse()
1099 jbs->resolve.port = (in_port_t) port; in nxt_job_sockaddr_inet_parse()
1115 port = jbs->resolve.port; in nxt_job_sockaddr_inet_parse()
1126 if (port < 1 || port > 65535) { in nxt_job_sockaddr_inet_parse()
[all …]
H A Dnxt_port.h201 nxt_port_t *port; member
320 void nxt_port_destroy(nxt_port_t *port);
321 void nxt_port_close(nxt_task_t *task, nxt_port_t *port);
323 void nxt_port_write_close(nxt_port_t *port);
325 void nxt_port_read_close(nxt_port_t *port);
331 nxt_port_socket_write(nxt_task_t *task, nxt_port_t *port, in nxt_port_socket_write() argument
339 void nxt_port_enable(nxt_task_t *task, nxt_port_t *port,
357 nxt_int_t nxt_port_post(nxt_task_t *task, nxt_port_t *port,
359 void nxt_port_use(nxt_task_t *task, nxt_port_t *port, int i);
361 nxt_inline void nxt_port_inc_use(nxt_port_t *port) in nxt_port_inc_use() argument
[all …]
H A Dnxt_main_process.c343 nxt_port_t *port; in nxt_main_new_port_handler() local
347 port = msg->u.new_port; in nxt_main_new_port_handler()
349 if (port != NULL in nxt_main_new_port_handler()
356 port->queue = mem; in nxt_main_new_port_handler()
554 nxt_port_t *port; in nxt_main_process_created_handler() local
566 process = port->process; in nxt_main_process_created_handler()
619 nxt_port_t *port; in nxt_main_process_whoami_handler() local
656 port->pair[0] = -1; in nxt_main_process_whoami_handler()
700 nxt_port_t *port; in nxt_main_process_port_create() local
709 process = port->process; in nxt_main_process_port_create()
[all …]
H A Dnxt_router.c812 tmcf->port = port; in nxt_router_conf_data_handler()
2887 port->main_app_port = port; in nxt_router_app_prefork_ready()
2899 &app->name, port->pid, port->id); in nxt_router_app_prefork_ready()
3379 engine->port = port; in nxt_router_thread_start()
4116 port = engine->port; in nxt_router_thread_exit_handler()
4609 port->main_app_port = port; in nxt_router_app_port_ready()
4798 port->pid, port->id, in nxt_router_app_port_release()
4915 port->pid, port->id); in nxt_router_app_port_close()
4926 &app->name, port->pid, port->id, in nxt_router_app_port_close()
5026 &app->name, port->pid, port->id); in nxt_router_adjust_idle_timer()
[all …]
H A Dnxt_unit.c1512 port = &port_impl->port; in nxt_unit_request_check_response_port()
1522 port->id.pid, port->id.id); in nxt_unit_request_check_response_port()
5397 port->in_fd, port->out_fd); in nxt_unit_port_release()
5443 port->id.pid, port->id.id, in nxt_unit_add_port()
5522 port->id.pid, port->id.id, in nxt_unit_add_port()
5523 port->in_fd, port->out_fd, queue); in nxt_unit_add_port()
5539 port->id.pid, port->id.id); in nxt_unit_add_port()
5544 new_port->port = *port; in nxt_unit_add_port()
5549 port->id.pid, port->id.id); in nxt_unit_add_port()
5683 port->in_fd, port->out_fd, port->data); in nxt_unit_remove_port_unsafe()
[all …]
H A Dnxt_test_build.c66 port_associate(int port, int source, uintptr_t object, int events, void *user) in port_associate() argument
73 port_dissociate(int port, int source, uintptr_t object) in port_dissociate() argument
80 port_send(int port, int events, void *user) in port_send() argument
86 int port_getn(int port, port_event_t list[], uint_t max, uint_t *nget, in port_getn() argument
H A Dnxt_process.c169 nxt_port_t *port; in nxt_process_start() local
221 nxt_port_read_close(port); in nxt_process_start()
235 nxt_port_close(task, port); in nxt_process_start()
240 nxt_port_use(task, port, -1); in nxt_process_start()
432 nxt_port_t *port; in nxt_process_do_start() local
462 nxt_port_write_close(port); in nxt_process_do_start()
536 nxt_port_t *port; in nxt_process_whoami_ok() local
555 port->pid = pid; in nxt_process_whoami_ok()
991 port->process = process; in nxt_process_port_add()
1009 nxt_port_t *port; in nxt_process_close_ports() local
[all …]
H A Dnxt_eventport_engine.c135 int port; in nxt_eventport_free() local
137 port = engine->u.eventport.fd; in nxt_eventport_free()
141 if (port != -1 && close(port) != 0) { in nxt_eventport_free()
143 port, nxt_errno); in nxt_eventport_free()
299 int ret, port; in nxt_eventport_commit_changes() local
304 port = engine->u.eventport.fd; in nxt_eventport_commit_changes()
307 port, engine->u.eventport.nchanges); in nxt_eventport_commit_changes()
321 ret = port_associate(port, PORT_SOURCE_FD, in nxt_eventport_commit_changes()
438 int port; in nxt_eventport_signal() local
440 port = engine->u.eventport.fd; in nxt_eventport_signal()
[all …]
H A Dnxt_port_hash.h14 nxt_int_t nxt_port_hash_add(nxt_lvlhsh_t *port_hash, nxt_port_t *port);
16 nxt_int_t nxt_port_hash_remove(nxt_lvlhsh_t *port_hash, nxt_port_t *port);
H A Dnxt_runtime.c497 nxt_port_t *port; in nxt_runtime_stop_app_processes() local
524 nxt_port_t *port; in nxt_runtime_stop_all_processes() local
1547 nxt_port_t *port; in nxt_runtime_process_add() local
1574 port->pid = process->pid; in nxt_runtime_process_add()
1642 nxt_port_t *port; in nxt_runtime_process_port_create() local
1662 nxt_port_use(task, port, -1); in nxt_runtime_process_port_create()
1664 return port; in nxt_runtime_process_port_create()
1682 rt->port_by_type[port->type] = port; in nxt_runtime_port_add()
1684 nxt_port_use(task, port, 1); in nxt_runtime_port_add()
1702 if (rt->port_by_type[port->type] == port) { in nxt_runtime_port_remove()
[all …]
H A Dnxt_process.h169 #define nxt_process_port_remove(port) \ argument
170 nxt_queue_remove(&port->link)
176 nxt_port_t *port);
178 #define nxt_process_port_each(process, port) \ argument
179 nxt_queue_each(port, &process->ports, nxt_port_t, link)
/unit/test/
H A Dtest_tls_tickets.py48 def set_tickets(self, tickets=True, port=7080): argument
51 'listeners/*:' + str(port) + '/tls/session',
54 def connect(self, ctx=None, session=None, port=7080): argument
55 sock = socket.create_connection(('127.0.0.1', port))
120 self.set_tickets(self.ticket2, port=7081)
150 self.set_tickets(self.ticket, port=7081)
151 self.set_tickets(self.ticket2, port=7082)
154 _, _, reused = self.connect(ctx, sess, port=7081)
156 _, _, reused = self.connect(ctx, sess, port=7082)
159 sess, ctx, _ = self.connect(port=7081)
[all …]
H A Dtest_client_ip.py23 port = 7081 if sock_type == 'ipv4' else 7082
27 port=port,
39 assert self.get(port=7081)['body'] == '127.0.0.1', 'ipv4 default'
41 self.get(sock_type='ipv6', port=7082)['body'] == '::1'
49 assert self.get(port=7081)['body'] == '127.0.0.1', 'ipv4 default 2'
51 self.get(sock_type='ipv6', port=7082)['body'] == '::1'
H A Dtest_routing.py1475 port = sock.getsockname()[1]
1476 return (sock, port)
1478 sock, port = sock_port()
1485 sock, port = sock_port()
1492 sock, port = sock_port()
1499 sock, port = sock_port()
1502 self.route_match({"source": "127.0.0.1:" + str(port) + "-" + str(port)})
1558 return self.get(sock_type='ipv6', port=7081)
1667 return self.get(sock_type='ipv6', port=7081)
1716 assert self.get(port=7081)['status'] == 404, '1 ipv4'
[all …]
H A Dtest_upstreams_rr.py46 def get_resps(self, req=100, port=7080): argument
50 status = self.get(port=port)['status']
62 def get_resps_sc(self, req=100, port=7080): argument
76 resp = self.http(to_send, raw_resp=True, raw=True, port=port)
215 resps = self.get_resps_sc(req=30, port=7090)
227 resps = self.get_resps_sc(req=30, port=7090)
242 r_two = sum_resps(r_two, self.get_resps(req=10, port=7090))
/unit/go/
H A Dnxt_cgo_lib.c13 static ssize_t nxt_cgo_port_send(nxt_unit_ctx_t *ctx, nxt_unit_port_t *port,
15 static ssize_t nxt_cgo_port_recv(nxt_unit_ctx_t *ctx, nxt_unit_port_t *port,
51 nxt_cgo_port_send(nxt_unit_ctx_t *ctx, nxt_unit_port_t *port, in nxt_cgo_port_send() argument
54 return nxt_go_port_send(port->id.pid, port->id.id, in nxt_cgo_port_send()
60 nxt_cgo_port_recv(nxt_unit_ctx_t *ctx, nxt_unit_port_t *port, in nxt_cgo_port_recv() argument
63 return nxt_go_port_recv(port->id.pid, port->id.id, in nxt_cgo_port_recv()
H A Dport.go26 type port struct { struct
34 m map[port_key]*port
39 func find_port(key port_key) *port {
47 func add_port(p *port) { argument
51 port_registry_.m = make(map[port_key]*port)
63 func (p *port) Close() { argument
99 new_port := &port{
/unit/src/python/
H A Dnxt_python_asgi.c26 nxt_unit_port_t *port);
32 uint16_t port);
39 nxt_unit_port_t *port);
381 if (port == NULL || port->in_fd == -1) { in nxt_py_asgi_remove_reader()
387 nxt_unit_debug(ctx, "asgi_remove_reader %d %p", port->in_fd, port); in nxt_py_asgi_remove_reader()
764 v = PyLong_FromLong(port); in nxt_py_asgi_create_address()
896 if (port->in_fd == -1) { in nxt_py_asgi_add_port()
909 nxt_unit_debug(ctx, "asgi_add_port %d %p %p", port->in_fd, ctx, port); in nxt_py_asgi_add_port()
922 nxt_unit_debug(ctx, "asgi_add_reader %d %p %p", port->in_fd, ctx, port); in nxt_py_asgi_add_reader()
981 nxt_unit_port_t *port) in nxt_py_asgi_remove_port() argument
[all …]
/unit/src/java/nginx/unit/websocket/server/
H A DWsHandshakeRequest.java151 int port = req.getServerPort(); in buildRequestUri() local
152 if (port < 0) { in buildRequestUri()
154 port = 80; in buildRequestUri()
170 if ((scheme.equals("http") && (port != 80)) in buildRequestUri()
171 || (scheme.equals("https") && (port != 443))) { in buildRequestUri()
173 uri.append(port); in buildRequestUri()

12