summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_http_websocket.c
diff options
context:
space:
mode:
authorMax Romanov <max.romanov@nginx.com>2020-08-11 19:20:34 +0300
committerMax Romanov <max.romanov@nginx.com>2020-08-11 19:20:34 +0300
commite227fc9e6281c280c46139a81646ecd7b0510e2b (patch)
tree8f6e631790e7a83bb46c28bd45ebaa5e737a3424 /src/nxt_http_websocket.c
parenta82cf4ffb68126f2831ab9877a7ef283dd517690 (diff)
downloadunit-e227fc9e6281c280c46139a81646ecd7b0510e2b.tar.gz
unit-e227fc9e6281c280c46139a81646ecd7b0510e2b.tar.bz2
Introducing application and port shared memory queues.
The goal is to minimize the number of syscalls needed to deliver a message.
Diffstat (limited to 'src/nxt_http_websocket.c')
-rw-r--r--src/nxt_http_websocket.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/nxt_http_websocket.c b/src/nxt_http_websocket.c
index 393c20ac..1968633e 100644
--- a/src/nxt_http_websocket.c
+++ b/src/nxt_http_websocket.c
@@ -98,10 +98,10 @@ nxt_http_websocket_client(nxt_task_t *task, void *obj, void *data)
b = next;
}
- res = nxt_port_socket_twrite(task, req_rpc_data->app_port,
- NXT_PORT_MSG_WEBSOCKET, -1,
- req_rpc_data->stream,
- task->thread->engine->port->id, out, NULL);
+ res = nxt_port_socket_write(task, req_rpc_data->app_port,
+ NXT_PORT_MSG_WEBSOCKET, -1,
+ req_rpc_data->stream,
+ task->thread->engine->port->id, out);
if (nxt_slow_path(res != NXT_OK)) {
// TODO: handle
}
@@ -144,10 +144,10 @@ nxt_http_websocket_error_handler(nxt_task_t *task, void *obj, void *data)
goto close_handler;
}
- (void) nxt_port_socket_twrite(task, req_rpc_data->app_port,
- NXT_PORT_MSG_WEBSOCKET_LAST,
- -1, req_rpc_data->stream,
- task->thread->engine->port->id, NULL, NULL);
+ (void) nxt_port_socket_write(task, req_rpc_data->app_port,
+ NXT_PORT_MSG_WEBSOCKET_LAST,
+ -1, req_rpc_data->stream,
+ task->thread->engine->port->id, NULL);
close_handler: