Home
last modified time | relevance | path

Searched refs:opcode (Results 1 – 16 of 16) sorted by relevance

/unit/src/test/
H A Dnxt_unit_websocket_echo.c54 uint8_t opcode; in ws_echo_websocket_handler() local
67 opcode = ws->header->opcode; in ws_echo_websocket_handler()
69 if (opcode == NXT_WEBSOCKET_OP_PONG) { in ws_echo_websocket_handler()
76 nxt_unit_websocket_send(req, opcode, ws->header->fin, buf, size); in ws_echo_websocket_handler()
79 if (opcode == NXT_WEBSOCKET_OP_CLOSE) { in ws_echo_websocket_handler()
H A Dnxt_unit_websocket_chat.c167 if (ws->header->opcode != NXT_WEBSOCKET_OP_TEXT) { in ws_chat_websocket_handler()
/unit/src/nodejs/unit-http/
H A Dwebsocket_connection.js330 if (this.frameQueue.length !== 0 && (frame.opcode > 0x00 && frame.opcode < 0x08)) {
337 switch(frame.opcode) {
399 var opcode = this.frameQueue[0].opcode;
407 switch (opcode) {
534 frame.opcode = 0x01; // WebSocketOpcode.TEXT_FRAME
547 frame.opcode = 0x02; // WebSocketOpcode.BINARY_FRAME
557 frame.opcode = 0x09; // WebSocketOpcode.PING
580 frame.opcode = 0x0A; // WebSocketOpcode.PONG
593 if (frame.opcode > 0x07) {
628 currentFrame.opcode = (i === 1) ? frame.opcode : 0x00;
[all …]
H A Dunit.cpp716 set_named_property(res, "opcode", ws->header->opcode); in create_websocket_frame()
719 if (ws->header->opcode == NXT_WEBSOCKET_OP_CLOSE) { in create_websocket_frame()
1044 uint32_t opcode, sc; in websocket_send_frame() local
1058 opcode = napi.get_value_uint32(napi.get_named_property(frame, in websocket_send_frame()
1060 if (opcode == NXT_WEBSOCKET_OP_CLOSE) { in websocket_send_frame()
1097 ret = nxt_unit_websocket_sendv(req, opcode, fin ? 1 : 0, iov, iovec_len); in websocket_send_frame()
/unit/src/python/
H A Dnxt_python_asgi_websocket.c420 uint8_t opcode; in nxt_py_asgi_websocket_send_frame() local
471 opcode = NXT_WEBSOCKET_OP_BINARY; in nxt_py_asgi_websocket_send_frame()
475 opcode = NXT_WEBSOCKET_OP_TEXT; in nxt_py_asgi_websocket_send_frame()
491 uint8_t opcode; in nxt_py_asgi_websocket_handler() local
501 opcode = frame->header->opcode; in nxt_py_asgi_websocket_handler()
511 opcode); in nxt_py_asgi_websocket_handler()
735 uint8_t code_buf[2], opcode; in nxt_py_asgi_websocket_pop_msg() local
763 opcode = frame->header->opcode; in nxt_py_asgi_websocket_pop_msg()
777 switch (opcode) { in nxt_py_asgi_websocket_pop_msg()
851 opcode); in nxt_py_asgi_websocket_pop_msg()
[all …]
/unit/src/
H A Dnxt_websocket_header.h18 uint8_t opcode:4; member
25 uint8_t opcode:4; member
H A Dnxt_h1proto_websocket.c194 wsh->opcode = NXT_WEBSOCKET_OP_PING; in nxt_h1p_conn_ws_keepalive()
270 if ((wsh->opcode & NXT_WEBSOCKET_OP_CTRL) != 0) { in nxt_h1p_conn_ws_frame_header_read()
276 if (nxt_slow_path(wsh->opcode != NXT_WEBSOCKET_OP_PING in nxt_h1p_conn_ws_frame_header_read()
281 wsh->opcode); in nxt_h1p_conn_ws_frame_header_read()
291 if (nxt_slow_path(wsh->opcode == NXT_WEBSOCKET_OP_CLOSE in nxt_h1p_conn_ws_frame_header_read()
302 wsh->opcode); in nxt_h1p_conn_ws_frame_header_read()
311 wsh->opcode); in nxt_h1p_conn_ws_frame_header_read()
411 if (nxt_slow_path(wsh->opcode == NXT_WEBSOCKET_OP_PING)) { in nxt_h1p_conn_ws_frame_process()
416 if (nxt_slow_path(wsh->opcode == NXT_WEBSOCKET_OP_CLOSE)) { in nxt_h1p_conn_ws_frame_process()
616 wsh->opcode = NXT_WEBSOCKET_OP_CLOSE; in hxt_h1p_send_ws_error()
[all …]
H A Dnxt_unit.h322 int nxt_unit_websocket_send(nxt_unit_request_info_t *req, uint8_t opcode,
325 int nxt_unit_websocket_sendv(nxt_unit_request_info_t *req, uint8_t opcode,
H A Dnxt_java.c575 ws->header->opcode, ws->header->fin); in nxt_java_websocket_handler()
H A Dnxt_unit.c1687 ws_impl->ws.header->opcode, in nxt_unit_process_websocket()
3302 nxt_unit_websocket_send(nxt_unit_request_info_t *req, uint8_t opcode, in nxt_unit_websocket_send() argument
3307 return nxt_unit_websocket_sendv(req, opcode, last, &iov, 1); in nxt_unit_websocket_send()
3312 nxt_unit_websocket_sendv(nxt_unit_request_info_t *req, uint8_t opcode, in nxt_unit_websocket_sendv() argument
3351 wh->opcode = opcode; in nxt_unit_websocket_sendv()
/unit/src/java/
H A Dnxt_jni_Request.h19 uint8_t opcode, uint8_t fin);
H A Dnxt_jni_Request.c813 uint8_t opcode, uint8_t fin) in nxt_java_Request_websocket() argument
815 (*env)->CallVoidMethod(env, jreq, nxt_java_Request_processWsFrame, jbuf, opcode, fin); in nxt_java_Request_websocket()
/unit/test/
H A Dtest_java_websockets.py42 if opcode == self.ws.OP_BINARY or not decode:
48 assert frame['opcode'] == opcode, 'opcode'
344 opcode = self.ws.OP_TEXT
354 self.check_frame(frame, True, opcode, payload)
370 opcode = self.ws.OP_BINARY
466 opcode = self.ws.OP_PING
1268 if opcode == self.ws.OP_TEXT:
1277 def check_message(opcode, f_size): argument
1278 if opcode == self.ws.OP_TEXT:
1364 opcode = self.ws.OP_TEXT
[all …]
H A Dtest_node_websockets.py42 if opcode == self.ws.OP_BINARY or not decode:
48 assert frame['opcode'] == opcode, 'opcode'
363 opcode = self.ws.OP_TEXT
373 self.check_frame(frame, True, opcode, payload)
389 opcode = self.ws.OP_BINARY
485 opcode = self.ws.OP_PING
1287 if opcode == self.ws.OP_TEXT:
1296 def check_message(opcode, f_size): argument
1297 if opcode == self.ws.OP_TEXT:
1383 opcode = self.ws.OP_TEXT
[all …]
H A Dtest_asgi_websockets.py48 if opcode == self.ws.OP_BINARY or not decode:
54 assert frame['opcode'] == opcode, 'opcode'
417 opcode = self.ws.OP_TEXT
427 self.check_frame(frame, True, opcode, payload)
443 opcode = self.ws.OP_BINARY
539 opcode = self.ws.OP_PING
1341 if opcode == self.ws.OP_TEXT:
1350 def check_message(opcode, f_size): argument
1351 if opcode == self.ws.OP_TEXT:
1437 opcode = self.ws.OP_TEXT
[all …]
/unit/test/unit/applications/
H A Dwebsockets.py145 opcode, argument
164 | opcode