Home
last modified time | relevance | path

Searched refs:ws (Results 1 – 14 of 14) sorted by last modified time

/unit/src/
H A Dnxt_unit.c268 nxt_unit_websocket_frame_t ws; member
1636 ws_impl->ws.req = req; in nxt_unit_process_websocket()
1673 ws_impl->ws.header); in nxt_unit_process_websocket()
1687 ws_impl->ws.content_length = ws_impl->ws.payload_len; in nxt_unit_process_websocket()
1882 ws_impl = nxt_container_of(ws, nxt_unit_websocket_frame_impl_t, ws); in nxt_unit_websocket_frame_release()
1888 ws->req = NULL; in nxt_unit_websocket_frame_release()
3408 res = nxt_unit_buf_read(&ws->content_buf, &ws->content_length, in nxt_unit_websocket_read()
3411 if (ws->mask == NULL) { in nxt_unit_websocket_read()
3416 d = (ws->payload_len - ws->content_length - res) % 4; in nxt_unit_websocket_read()
3433 ws_impl = nxt_container_of(ws, nxt_unit_websocket_frame_impl_t, ws); in nxt_unit_websocket_retain()
[all …]
H A Dnxt_unit.h130 void (*websocket_handler)(nxt_unit_websocket_frame_t *ws);
328 ssize_t nxt_unit_websocket_read(nxt_unit_websocket_frame_t *ws, void *dst,
331 int nxt_unit_websocket_retain(nxt_unit_websocket_frame_t *ws);
333 void nxt_unit_websocket_done(nxt_unit_websocket_frame_t *ws);
H A Dnxt_java.c37 static void nxt_java_websocket_handler(nxt_unit_websocket_frame_t *ws);
558 nxt_java_websocket_handler(nxt_unit_websocket_frame_t *ws) in nxt_java_websocket_handler() argument
565 env = ws->req->ctx->data; in nxt_java_websocket_handler()
566 data = ws->req->data; in nxt_java_websocket_handler()
568 b = malloc(ws->payload_len); in nxt_java_websocket_handler()
570 nxt_unit_websocket_read(ws, b, ws->payload_len); in nxt_java_websocket_handler()
572 jbuf = (*env)->NewDirectByteBuffer(env, b, ws->payload_len); in nxt_java_websocket_handler()
575 ws->header->opcode, ws->header->fin); in nxt_java_websocket_handler()
588 nxt_unit_websocket_done(ws); in nxt_java_websocket_handler()
/unit/test/
H A Dtest_java_websockets.py26 self.ws.frame_write(sock, self.ws.OP_CLOSE, self.ws.serialize_close())
71 self.ws.frame_write(sock, self.ws.OP_TEXT, message)
76 self.ws.frame_write(sock, self.ws.OP_TEXT, message)
429 self.ws.frame_write(sock, self.ws.OP_PONG, '')
1071 self.ws.frame_write(sock, self.ws.OP_CLOSE, self.ws.serialize_close())
1072 self.ws.frame_write(sock, self.ws.OP_CLOSE, self.ws.serialize_close())
1080 self.ws.frame_write(sock, self.ws.OP_CLOSE, self.ws.serialize_close())
1092 self.ws.frame_write(sock, self.ws.OP_CLOSE, self.ws.serialize_close())
1105 self.ws.frame_write(sock, self.ws.OP_CLOSE, self.ws.serialize_close())
1119 self.ws.frame_write(sock, self.ws.OP_CLOSE, self.ws.serialize_close())
[all …]
H A Dtest_node_websockets.py26 self.ws.frame_write(sock, self.ws.OP_CLOSE, self.ws.serialize_close())
71 self.ws.frame_write(sock, self.ws.OP_TEXT, message)
76 self.ws.frame_write(sock, self.ws.OP_TEXT, message)
448 self.ws.frame_write(sock, self.ws.OP_PONG, '')
1090 self.ws.frame_write(sock, self.ws.OP_CLOSE, self.ws.serialize_close())
1091 self.ws.frame_write(sock, self.ws.OP_CLOSE, self.ws.serialize_close())
1099 self.ws.frame_write(sock, self.ws.OP_CLOSE, self.ws.serialize_close())
1111 self.ws.frame_write(sock, self.ws.OP_CLOSE, self.ws.serialize_close())
1124 self.ws.frame_write(sock, self.ws.OP_CLOSE, self.ws.serialize_close())
1138 self.ws.frame_write(sock, self.ws.OP_CLOSE, self.ws.serialize_close())
[all …]
H A Dtest_asgi_websockets.py32 self.ws.frame_write(sock, self.ws.OP_CLOSE, self.ws.serialize_close())
92 self.ws.frame_write(sock, self.ws.OP_TEXT, message)
97 self.ws.frame_write(sock, self.ws.OP_TEXT, message)
502 self.ws.frame_write(sock, self.ws.OP_PONG, '')
1144 self.ws.frame_write(sock, self.ws.OP_CLOSE, self.ws.serialize_close())
1145 self.ws.frame_write(sock, self.ws.OP_CLOSE, self.ws.serialize_close())
1153 self.ws.frame_write(sock, self.ws.OP_CLOSE, self.ws.serialize_close())
1165 self.ws.frame_write(sock, self.ws.OP_CLOSE, self.ws.serialize_close())
1178 self.ws.frame_write(sock, self.ws.OP_CLOSE, self.ws.serialize_close())
1192 self.ws.frame_write(sock, self.ws.OP_CLOSE, self.ws.serialize_close())
[all …]
H A Dtest_node_es_modules.py14 ws = TestApplicationWebsocket() variable in TestNodeESModules
36 _, sock, _ = self.ws.upgrade()
38 self.ws.frame_write(sock, self.ws.OP_TEXT, message)
39 frame = self.ws.frame_read(sock)
43 self.ws.frame_write(sock, self.ws.OP_TEXT, message)
44 frame = self.ws.frame_read(sock)
/unit/src/python/
H A Dnxt_python_asgi_websocket.c122 ws->req = req; in nxt_py_asgi_websocket_create()
129 ws->pending_fins = 0; in nxt_py_asgi_websocket_create()
132 return (PyObject *) ws; in nxt_py_asgi_websocket_create()
265 switch(ws->state) { in nxt_py_asgi_websocket_accept()
352 Py_INCREF(ws); in nxt_py_asgi_websocket_accept()
354 return (PyObject *) ws; in nxt_py_asgi_websocket_accept()
410 Py_INCREF(ws); in nxt_py_asgi_websocket_close()
483 Py_INCREF(ws); in nxt_py_asgi_websocket_send_frame()
497 ws = frame->req->data; in nxt_py_asgi_websocket_handler()
682 ws = frame->req->data; in nxt_py_asgi_websocket_suspend_frame()
[all …]
H A Dnxt_python_asgi.h64 void nxt_py_asgi_websocket_handler(nxt_unit_websocket_frame_t *ws);
/unit/src/nodejs/unit-http/
H A Dunit.h34 static void websocket_handler_cb(nxt_unit_websocket_frame_t *ws);
35 void websocket_handler(nxt_unit_websocket_frame_t *ws);
62 nxt_unit_websocket_frame_t *ws);
H A Dunit.cpp345 Unit::websocket_handler_cb(nxt_unit_websocket_frame_t *ws) in websocket_handler_cb() argument
349 obj = reinterpret_cast<Unit *>(ws->req->unit->data); in websocket_handler_cb()
351 obj->websocket_handler(ws); in websocket_handler_cb()
356 Unit::websocket_handler(nxt_unit_websocket_frame_t *ws) in websocket_handler() argument
361 req_data = (req_data_t *) ws->req->data; in websocket_handler()
368 frame = create_websocket_frame(server_obj, ws); in websocket_handler()
383 nxt_unit_websocket_done(ws); in websocket_handler()
718 if (ws->header->opcode == NXT_WEBSOCKET_OP_CLOSE) { in create_websocket_frame()
719 if (ws->payload_len >= 2) { in create_websocket_frame()
720 nxt_unit_websocket_read(ws, sc, 2); in create_websocket_frame()
[all …]
/unit/src/test/
H A Dnxt_unit_websocket_chat.c161 ws_chat_websocket_handler(nxt_unit_websocket_frame_t *ws) in ws_chat_websocket_handler() argument
167 if (ws->header->opcode != NXT_WEBSOCKET_OP_TEXT) { in ws_chat_websocket_handler()
171 data = ws->req->data; in ws_chat_websocket_handler()
175 buf_size += nxt_unit_websocket_read(ws, buf + buf_size, in ws_chat_websocket_handler()
177 ws->content_length)); in ws_chat_websocket_handler()
181 nxt_unit_websocket_done(ws); in ws_chat_websocket_handler()
H A Dnxt_unit_websocket_echo.c52 ws_echo_websocket_handler(nxt_unit_websocket_frame_t *ws) in ws_echo_websocket_handler() argument
61 if (buf_size < ws->content_length) { in ws_echo_websocket_handler()
62 buf = realloc(buf, ws->content_length); in ws_echo_websocket_handler()
63 buf_size = ws->content_length; in ws_echo_websocket_handler()
66 req = ws->req; in ws_echo_websocket_handler()
67 opcode = ws->header->opcode; in ws_echo_websocket_handler()
70 nxt_unit_websocket_done(ws); in ws_echo_websocket_handler()
74 size = nxt_unit_websocket_read(ws, buf, ws->content_length); in ws_echo_websocket_handler()
76 nxt_unit_websocket_send(req, opcode, ws->header->fin, buf, size); in ws_echo_websocket_handler()
77 nxt_unit_websocket_done(ws); in ws_echo_websocket_handler()
/unit/src/java/nginx/unit/websocket/
H A DLocalStrings.properties140 …etContainer.pathWrongScheme=The scheme [{0}] is not supported. The supported schemes are ws and wss