Home
last modified time | relevance | path

Searched refs:code (Results 1 – 25 of 37) sorted by relevance

12

/unit/src/java/javax/websocket/
H A DCloseReason.java65 private int code; field in CloseReason.CloseCodes
67 CloseCodes(int code) { in CloseCodes() argument
68 this.code = code; in CloseCodes()
71 public static CloseCode getCloseCode(final int code) { in getCloseCode() argument
72 if (code > 2999 && code < 5000) { in getCloseCode()
76 return code; in getCloseCode()
80 switch (code) { in getCloseCode()
113 "Invalid close code: [" + code + "]"); in getCloseCode()
119 return code; in getCode()
/unit/src/
H A Dnxt_pcre.c12 pcre *code; member
60 re->code = pcre_compile(pattern, 0, &err->msg, &erroffset, NULL); in nxt_regex_compile()
61 if (nxt_fast_path(re->code != NULL)) { in nxt_regex_compile()
63 re->extra = pcre_study(re->code, PCRE_STUDY_JIT_COMPILE, &err->msg); in nxt_regex_compile()
124 ret = pcre_exec(re->code, re->extra, (const char *) subject, length, 0, 0, in nxt_regex_match()
H A Dnxt_pcre2.c18 pcre2_code *code; member
55 re->code = pcre2_compile((PCRE2_SPTR) source->start, source->length, 0, in nxt_regex_compile()
57 if (nxt_slow_path(re->code == NULL)) { in nxt_regex_compile()
139 ret = pcre2_match(re->code, (PCRE2_SPTR) subject, length, 0, 0, match, in nxt_regex_match()
H A Dnxt_h1proto_websocket.c14 uint16_t code; member
404 uint16_t code; in nxt_h1p_conn_ws_frame_process() local
422 code = ((p[0] ^ mask[0]) << 8) + (p[1] ^ mask[1]); in nxt_h1p_conn_ws_frame_process()
424 if (nxt_slow_path(code < 1000 || code >= 5000 in nxt_h1p_conn_ws_frame_process()
425 || (code > 1003 && code < 1007) in nxt_h1p_conn_ws_frame_process()
426 || (code > 1014 && code < 3000))) in nxt_h1p_conn_ws_frame_process()
429 code); in nxt_h1p_conn_ws_frame_process()
603 out = nxt_http_buf_mem(task, r, 2 + sizeof(err->code) + desc.length); in hxt_h1p_send_ws_error()
613 p = nxt_websocket_frame_init(wsh, sizeof(err->code) + desc.length); in hxt_h1p_send_ws_error()
618 *p++ = (err->code >> 8) & 0xFF; in hxt_h1p_send_ws_error()
[all …]
/unit/src/java/
H A DREADME.JSR-3403 This version of Unit code is made available in support of the open source
5 testing purposes only. This Unit code is untested and presumed incompatible
7 write to this code. You should instead deploy and write production
/unit/src/nodejs/unit-http/
H A Dwebsocket_connection.js136 function validateCloseReason(code) { argument
137 if (code < 1000) {
141 if (code >= 1000 && code <= 2999) {
144 …turn [1000, 1001, 1002, 1003, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014].indexOf(code) !== -1;
146 if (code >= 3000 && code <= 3999) {
152 if (code >= 4000 && code <= 4999) {
157 if (code >= 5000) {
178 this.closeDescription = 'Socket Error: ' + error.syscall + ' ' + error.code;
/unit/test/unit/applications/
H A Dwebsockets.py69 def serialize_close(self, code=1000, reason=''): argument
70 return struct.pack('!H', code) + reason.encode('utf-8')
124 (code,) = struct.unpack('!H', data[:2])
126 if not (code in self.CLOSE_CODES or 3000 <= code < 5000):
128 frame['code'] = code
/unit/src/python/
H A Dnxt_python_asgi_websocket.c363 PyObject *code; in nxt_py_asgi_websocket_close() local
380 if (nxt_slow_path(code != NULL && !PyLong_Check(code))) { in nxt_py_asgi_websocket_close()
384 status_code = (code != NULL) ? htons(PyLong_AsLong(code)) in nxt_py_asgi_websocket_close()
736 uint16_t code; in nxt_py_asgi_websocket_pop_msg() local
822 code = NXT_WEBSOCKET_CR_NORMAL; in nxt_py_asgi_websocket_pop_msg()
827 data = PyLong_FromLong(code); in nxt_py_asgi_websocket_pop_msg()
831 (int) code); in nxt_py_asgi_websocket_pop_msg()
1009 PyObject *msg, *code; in nxt_py_asgi_websocket_disconnect_msg() local
1017 if (nxt_slow_path(code == NULL)) { in nxt_py_asgi_websocket_disconnect_msg()
1030 Py_DECREF(code); in nxt_py_asgi_websocket_disconnect_msg()
[all …]
H A Dnxt_python_asgi.c69 PyCodeObject *code; in nxt_python_asgi_check() local
77 code = (PyCodeObject *) PyFunction_GET_CODE(func); in nxt_python_asgi_check()
81 (code->co_flags & CO_COROUTINE) != 0 ? "" : "not ", in nxt_python_asgi_check()
82 code->co_argcount); in nxt_python_asgi_check()
84 res = (code->co_flags & CO_COROUTINE) != 0 || code->co_argcount == 1; in nxt_python_asgi_check()
144 PyCodeObject *code; in nxt_python_asgi_init() local
177 code = (PyCodeObject *) PyFunction_GET_CODE(func); in nxt_python_asgi_init()
179 if ((code->co_flags & CO_COROUTINE) == 0) { in nxt_python_asgi_init()
/unit/go/
H A Dresponse.go55 func (r *response) WriteHeader(code int) {
77 C.nxt_unit_response_init(r.c_req, C.uint16_t(code), C.uint32_t(fields),
/unit/pkg/deb/
H A DMakefile.jsc853 This version of Unit code is made available in support of the open source
55 testing purposes only. This Unit code is untested and presumed incompatible
57 write to this code. You should instead deploy and write production
H A DMakefile.jsc1053 This version of Unit code is made available in support of the open source
55 testing purposes only. This Unit code is untested and presumed incompatible
57 write to this code. You should instead deploy and write production
H A DMakefile.jsc1153 This version of Unit code is made available in support of the open source
55 testing purposes only. This Unit code is untested and presumed incompatible
57 write to this code. You should instead deploy and write production
H A DMakefile.jsc1653 This version of Unit code is made available in support of the open source
55 testing purposes only. This Unit code is untested and presumed incompatible
57 write to this code. You should instead deploy and write production
H A DMakefile.jsc1753 This version of Unit code is made available in support of the open source
55 testing purposes only. This Unit code is untested and presumed incompatible
57 write to this code. You should instead deploy and write production
H A DMakefile.jsc1853 This version of Unit code is made available in support of the open source
55 testing purposes only. This Unit code is untested and presumed incompatible
57 write to this code. You should instead deploy and write production
/unit/pkg/deb/debian.module/
H A Dcontrol-noarch.in18 applications. It runs the application code in multiple languages
H A Dcontrol.in20 applications. It runs the application code in multiple languages
H A Dcopyright.unit-jsc-common112 such derivative works, in source code and object code form.
162 iv) states that source code for the Program is available from such
166 When the Program is made available in source code form:
313 including but not limited to software source code, documentation
318 not limited to compiled object code, generated documentation,
541 form of computer software code that is originally released
550 code in which modifications are made and (b) associated
551 documentation included in or with such code.
591 granted: (1) for code that You delete from the Original
628 granted: (1) for any code that Contributor has deleted
[all …]
/unit/
H A DCONTRIBUTING.md42 information as possible, and a code sample or an executable test case showing
56 Before submitting a PR, please read the NGINX Unit code guidelines to know more
81 code; examples include "Tests:", "Packages:", or "Docker:", and also
/unit/src/perl/
H A Dnxt_perl_psgi_layer.c161 IV code; in nxt_perl_psgi_layer_stream_close() local
163 code = PerlIOBase_close(aTHX_ f); in nxt_perl_psgi_layer_stream_close()
166 return code; in nxt_perl_psgi_layer_stream_close()
/unit/src/java/nginx/unit/websocket/
H A DUtil.java86 static CloseCode getCloseCode(int code) { in getCloseCode() argument
87 if (code > 2999 && code < 5000) { in getCloseCode()
88 return CloseCodes.getCloseCode(code); in getCloseCode()
90 switch (code) { in getCloseCode()
H A DLocalStrings.properties141 ….proxyConnectFail=Failed to connect to the configured Proxy [{0}]. The HTTP response code was [{1}]
143 wsWebSocketContainer.missingLocationHeader=Failed to handle HTTP response code [{0}]. Missing Locat…
145 wsWebSocketContainer.unsupportedAuthScheme=Failed to handle HTTP response code [{0}]. Unsupported A…
146 wsWebSocketContainer.failedAuthentication=Failed to handle HTTP response code [{0}]. Authentication…
147 wsWebSocketContainer.missingWWWAuthenticateHeader=Failed to handle HTTP response code [{0}]. Missin…
/unit/pkg/deb/debian/
H A Dcontrol.in19 applications. It runs the application code in multiple languages
/unit/test/
H A Dtest_java_websockets.py30 def check_close(self, sock, code=1000, no_close=False, frame=None): argument
36 assert frame['code'] == code, 'close code'
1207 for code in valid_codes:
1210 payload = self.ws.serialize_close(code=code)
1213 self.check_close(sock, code=code)
1215 for code in invalid_codes:
1218 payload = self.ws.serialize_close(code=code)
1230 payload = self.ws.serialize_close(code=5000)

12