nxt_http_websocket.c (1547:cbcd76704c90) nxt_http_websocket.c (1555:1d84b9e4b459)
1
2/*
3 * Copyright (C) NGINX, Inc.
4 */
5
6#include <nxt_main.h>
7#include <nxt_router.h>
8#include <nxt_http.h>

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

93 b->completion_handler, task, b, b->parent);
94
95 r->ws_frame = next;
96 }
97
98 b = next;
99 }
100
1
2/*
3 * Copyright (C) NGINX, Inc.
4 */
5
6#include <nxt_main.h>
7#include <nxt_router.h>
8#include <nxt_http.h>

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

93 b->completion_handler, task, b, b->parent);
94
95 r->ws_frame = next;
96 }
97
98 b = next;
99 }
100
101 res = nxt_port_socket_twrite(task, req_rpc_data->app_port,
102 NXT_PORT_MSG_WEBSOCKET, -1,
103 req_rpc_data->stream,
104 task->thread->engine->port->id, out, NULL);
101 res = nxt_port_socket_write(task, req_rpc_data->app_port,
102 NXT_PORT_MSG_WEBSOCKET, -1,
103 req_rpc_data->stream,
104 task->thread->engine->port->id, out);
105 if (nxt_slow_path(res != NXT_OK)) {
106 // TODO: handle
107 }
108
109 b = r->ws_frame;
110
111 if (b != NULL) {
112 used_size = nxt_buf_mem_used_size(&b->mem);

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

139 goto close_handler;
140 }
141
142 if (req_rpc_data->app_port == NULL) {
143 nxt_debug(task, " app_port is NULL");
144 goto close_handler;
145 }
146
105 if (nxt_slow_path(res != NXT_OK)) {
106 // TODO: handle
107 }
108
109 b = r->ws_frame;
110
111 if (b != NULL) {
112 used_size = nxt_buf_mem_used_size(&b->mem);

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

139 goto close_handler;
140 }
141
142 if (req_rpc_data->app_port == NULL) {
143 nxt_debug(task, " app_port is NULL");
144 goto close_handler;
145 }
146
147 (void) nxt_port_socket_twrite(task, req_rpc_data->app_port,
148 NXT_PORT_MSG_WEBSOCKET_LAST,
149 -1, req_rpc_data->stream,
150 task->thread->engine->port->id, NULL, NULL);
147 (void) nxt_port_socket_write(task, req_rpc_data->app_port,
148 NXT_PORT_MSG_WEBSOCKET_LAST,
149 -1, req_rpc_data->stream,
150 task->thread->engine->port->id, NULL);
151
152close_handler:
153
154 nxt_http_request_close_handler(task, obj, data);
155}
151
152close_handler:
153
154 nxt_http_request_close_handler(task, obj, data);
155}