Lines Matching refs:r

33 static void hxt_h1p_send_ws_error(nxt_task_t *task, nxt_http_request_t *r,
73 nxt_h1p_websocket_first_frame_start(nxt_task_t *task, nxt_http_request_t *r, in nxt_h1p_websocket_first_frame_start() argument
83 h1p = r->proto.h1; in nxt_h1p_websocket_first_frame_start()
90 websocket_conf = &r->conf->socket_conf->websocket_conf; in nxt_h1p_websocket_first_frame_start()
96 hxt_h1p_send_ws_error(task, r, &nxt_ws_err_out_of_memory); in nxt_h1p_websocket_first_frame_start()
112 nxt_h1p_websocket_frame_start(task, r, ws_frame); in nxt_h1p_websocket_first_frame_start()
117 nxt_h1p_websocket_frame_start(nxt_task_t *task, nxt_http_request_t *r, in nxt_h1p_websocket_frame_start() argument
127 h1p = r->proto.h1; in nxt_h1p_websocket_frame_start()
166 nxt_http_request_t *r; in nxt_h1p_conn_ws_keepalive() local
176 r = h1p->request; in nxt_h1p_conn_ws_keepalive()
177 if (nxt_slow_path(r == NULL)) { in nxt_h1p_conn_ws_keepalive()
181 out = nxt_http_buf_mem(task, r, 2); in nxt_h1p_conn_ws_keepalive()
183 nxt_http_request_error_handler(task, r, r->proto.any); in nxt_h1p_conn_ws_keepalive()
196 nxt_http_request_send(task, r, out); in nxt_h1p_conn_ws_keepalive()
223 nxt_http_request_t *r; in nxt_h1p_conn_ws_frame_header_read() local
258 r = h1p->request; in nxt_h1p_conn_ws_frame_header_read()
259 if (nxt_slow_path(r == NULL)) { in nxt_h1p_conn_ws_frame_header_read()
263 r->ws_frame = c->read; in nxt_h1p_conn_ws_frame_header_read()
266 hxt_h1p_send_ws_error(task, r, &nxt_ws_err_not_masked); in nxt_h1p_conn_ws_frame_header_read()
272 hxt_h1p_send_ws_error(task, r, &nxt_ws_err_ctrl_fragmented); in nxt_h1p_conn_ws_frame_header_read()
280 hxt_h1p_send_ws_error(task, r, &nxt_ws_err_invalid_opcode, in nxt_h1p_conn_ws_frame_header_read()
286 hxt_h1p_send_ws_error(task, r, &nxt_ws_err_ctrl_too_big, in nxt_h1p_conn_ws_frame_header_read()
294 hxt_h1p_send_ws_error(task, r, &nxt_ws_err_invalid_close_len); in nxt_h1p_conn_ws_frame_header_read()
301 hxt_h1p_send_ws_error(task, r, &nxt_ws_err_cont_expected, in nxt_h1p_conn_ws_frame_header_read()
310 hxt_h1p_send_ws_error(task, r, &nxt_ws_err_invalid_opcode, in nxt_h1p_conn_ws_frame_header_read()
319 max_frame_size = r->conf->socket_conf->websocket_conf.max_frame_size; in nxt_h1p_conn_ws_frame_header_read()
326 hxt_h1p_send_ws_error(task, r, &nxt_ws_err_too_big, payload_len); in nxt_h1p_conn_ws_frame_header_read()
405 nxt_http_request_t *r; in nxt_h1p_conn_ws_frame_process() local
407 r = h1p->request; in nxt_h1p_conn_ws_frame_process()
412 nxt_h1p_conn_ws_pong(task, r, NULL); in nxt_h1p_conn_ws_frame_process()
428 hxt_h1p_send_ws_error(task, r, &nxt_ws_err_invalid_close_code, in nxt_h1p_conn_ws_frame_process()
437 r->state->ready_handler(task, r, NULL); in nxt_h1p_conn_ws_frame_process()
445 nxt_http_request_t *r; in nxt_h1p_conn_ws_error() local
451 r = h1p->request; in nxt_h1p_conn_ws_error()
455 if (nxt_fast_path(r != NULL)) { in nxt_h1p_conn_ws_error()
456 r->state->error_handler(task, r, h1p); in nxt_h1p_conn_ws_error()
501 nxt_http_request_t *r; in nxt_h1p_conn_ws_timeout() local
518 r = h1p->request; in nxt_h1p_conn_ws_timeout()
519 if (nxt_slow_path(r == NULL)) { in nxt_h1p_conn_ws_timeout()
523 hxt_h1p_send_ws_error(task, r, &nxt_ws_err_going_away); in nxt_h1p_conn_ws_timeout()
546 nxt_http_request_t *r; in nxt_h1p_conn_ws_frame_payload_read() local
558 r = h1p->request; in nxt_h1p_conn_ws_frame_payload_read()
559 if (nxt_slow_path(r == NULL)) { in nxt_h1p_conn_ws_frame_payload_read()
563 wsh = (nxt_websocket_header_t *) r->ws_frame->mem.pos; in nxt_h1p_conn_ws_frame_payload_read()
578 hxt_h1p_send_ws_error(nxt_task_t *task, nxt_http_request_t *r, in hxt_h1p_send_ws_error() argument
603 out = nxt_http_buf_mem(task, r, 2 + sizeof(err->code) + desc.length); in hxt_h1p_send_ws_error()
605 nxt_http_request_error_handler(task, r, r->proto.any); in hxt_h1p_send_ws_error()
622 out->next = nxt_http_buf_last(r); in hxt_h1p_send_ws_error()
628 nxt_http_request_send(task, r, out); in hxt_h1p_send_ws_error()
635 nxt_http_request_t *r; in nxt_h1p_conn_ws_error_sent() local
637 r = data; in nxt_h1p_conn_ws_error_sent()
641 r->state->error_handler(task, r, r->proto.any); in nxt_h1p_conn_ws_error_sent()
650 nxt_http_request_t *r; in nxt_h1p_conn_ws_pong() local
656 r = obj; in nxt_h1p_conn_ws_pong()
657 b = r->ws_frame; in nxt_h1p_conn_ws_pong()
668 out = nxt_http_buf_mem(task, r, 2 + payload_len); in nxt_h1p_conn_ws_pong()
670 nxt_http_request_error_handler(task, r, r->proto.any); in nxt_h1p_conn_ws_pong()
697 r->ws_frame = b; in nxt_h1p_conn_ws_pong()
699 nxt_http_request_send(task, r, out); in nxt_h1p_conn_ws_pong()
701 nxt_http_request_ws_frame_start(task, r, r->ws_frame); in nxt_h1p_conn_ws_pong()