nxt_h1proto_websocket.c (1268:dc403927ab0b) nxt_h1proto_websocket.c (1269:41331471eee7)
1
2/*
3 * Copyright (C) NGINX, Inc.
4 */
5
6#include <nxt_main.h>
7#include <nxt_router.h>
8#include <nxt_http.h>

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

692 out->mem.free = nxt_websocket_frame_init(wsh, payload_len);
693
694 wsh->fin = 1;
695 wsh->opcode = NXT_WEBSOCKET_OP_PONG;
696
697 for (i = 0; i < payload_len; i++) {
698 while (nxt_buf_mem_used_size(&b->mem) == 0) {
699 next = b->next;
1
2/*
3 * Copyright (C) NGINX, Inc.
4 */
5
6#include <nxt_main.h>
7#include <nxt_router.h>
8#include <nxt_http.h>

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

692 out->mem.free = nxt_websocket_frame_init(wsh, payload_len);
693
694 wsh->fin = 1;
695 wsh->opcode = NXT_WEBSOCKET_OP_PONG;
696
697 for (i = 0; i < payload_len; i++) {
698 while (nxt_buf_mem_used_size(&b->mem) == 0) {
699 next = b->next;
700 b->next = NULL;
700
701 nxt_work_queue_add(&task->thread->engine->fast_work_queue,
702 b->completion_handler, task, b, b->parent);
703
704 b = next;
705 }
706
707 *out->mem.free++ = *b->mem.pos++ ^ mask[i % 4];
708 }
709
710 r->ws_frame = b;
711
712 nxt_http_request_send(task, r, out);
713
714 nxt_http_request_ws_frame_start(task, r, r->ws_frame);
715}
701
702 nxt_work_queue_add(&task->thread->engine->fast_work_queue,
703 b->completion_handler, task, b, b->parent);
704
705 b = next;
706 }
707
708 *out->mem.free++ = *b->mem.pos++ ^ mask[i % 4];
709 }
710
711 r->ws_frame = b;
712
713 nxt_http_request_send(task, r, out);
714
715 nxt_http_request_ws_frame_start(task, r, r->ws_frame);
716}