Home
last modified time | relevance | path

Searched refs:sock (Results 1 – 25 of 71) sorted by relevance

123

/unit/test/
H A Dtest_node_websockets.py39 sock.close()
55 sock.close()
81 sock.close()
97 sock.close()
116 sock.close()
141 sock.close()
160 sock.close()
214 sock.close()
564 sock,
832 sock,
[all …]
H A Dtest_java_websockets.py39 sock.close()
55 sock.close()
81 sock.close()
97 sock.close()
116 sock.close()
141 sock.close()
195 sock.close()
326 sock.close()
545 sock,
813 sock,
[all …]
H A Dtest_asgi_websockets.py61 sock.close()
77 sock.close()
102 sock.close()
123 sock.close()
139 sock.close()
158 sock.close()
195 sock.close()
214 sock.close()
618 sock,
886 sock,
[all …]
H A Dtest_settings.py32 sock=sock,
67 sock=sock,
78 sock=sock,
84 sock.close()
93 sock=sock,
118 return self.http(b"""0123456789""", sock=sock, raw=True)
152 b"""012""", start=True, sock=sock, read_timeout=1, raw=True
158 b"""345""", start=True, sock=sock, read_timeout=1, raw=True
163 resp = self.http(b"""6789""", sock=sock, raw=True)
234 return self.get(sock=sock)
[all …]
H A Dtest_proxy.py23 sock.bind(server_address)
24 sock.listen(5)
26 def recvall(sock): argument
251 _, sock = self.http(
266 sock.close()
269 _, sock = self.http(
277 sock.close()
303 sock.close()
323 sock.close()
417 sock.close()
[all …]
H A Dtest_tls_conf_command.py38 (resp, sock) = self.get_ssl(start=True)
40 shared_ciphers = sock.shared_ciphers()
42 protocol = sock.cipher()[1]
55 sock.close()
58 (resp, sock) = self.get_ssl(start=True)
60 cipher = sock.cipher()
63 shared_ciphers = sock.shared_ciphers()
66 sock.close()
85 (resp, sock) = self.get_ssl(start=True)
87 cipher_new = sock.cipher()
[all …]
H A Dtest_asgi_application.py201 sock=sock,
232 socks.append(sock)
242 sock=socks[i],
258 sock=socks[i],
297 sock=sock,
308 resp = self.get(sock=sock)
317 (_, sock) = self.http(
336 sock=sock,
408 socks.append(sock)
414 for sock in socks:
[all …]
H A Dtest_reconfigure.py24 (_, sock) = self.http(
39 sock=sock,
45 (_, sock) = self.http(b'', raw=True, start=True, no_recv=True)
53 assert self.get(sock=sock)['status'] == 408, 'request timeout'
H A Dtest_node_es_modules.py36 _, 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)
48 sock.close()
H A Dtest_python_application.py185 sock=sock,
216 socks.append(sock)
226 sock=socks[i],
281 sock=sock,
292 resp = self.get(sock=sock)
589 _, sock = self.get(
604 assert self.get(sock=sock) == {}, 'closed connection'
624 _, sock = self.get(
639 assert self.get(sock=sock) == {}, 'closed connection 2'
818 for sock in socks:
[all …]
H A Dtest_proxy_chunked.py19 sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
20 sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
21 sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
24 sock.bind(server_address)
25 sock.listen(10)
27 def recvall(sock): argument
31 rlist = select.select([sock], [], [], 0.1)
36 part = sock.recv(buff_size)
45 connection, client_address = sock.accept()
H A Dtest_perl_application.py195 (resp, sock) = self.post(
215 sock=sock,
262 (_, sock) = self.get(
272 socks.append(sock)
276 for sock in socks:
277 resp = self.recvall(sock).decode('utf-8')
289 sock.close()
H A Dtest_reconfigure_tls.py52 (_, sock) = self.get(
63 assert self.get(sock=sock)['status'] == 200, 'reconfigure'
105 assert self.get(sock=ssl_sock)['status'] == 408, 'request timeout'
H A Dtest_tls_sni.py138 resp, sock = self.get_ssl(
148 assert sock.getpeercert()['subject'][0][0][1] == expect
180 resp, sock = self.get_ssl(
186 sock.getpeercert()['subject'][0][0][1]
266 resp, sock = self.get_ssl(
276 assert sock.getpeercert()['subjectAltName'][0][1] == 'alt.localhost.com'
H A Dtest_routing.py1476 return (sock, port)
1478 sock, port = sock_port()
1482 assert self.get(sock=sock)['status'] == 200, 'exact'
1485 sock, port = sock_port()
1489 assert self.get(sock=sock)['status'] == 404, 'negative'
1492 sock, port = sock_port()
1496 assert self.get(sock=sock)['status'] == 404, 'negative 3'
1499 sock, port = sock_port()
1503 assert self.get(sock=sock)['status'] == 200, 'range single'
1513 socks.sort(key=lambda sock: sock[1])
[all …]
H A Dtest_ruby_application.py346 (resp, sock) = self.post(
366 sock=sock,
400 (_, sock) = self.get(
410 socks.append(sock)
414 for sock in socks:
415 resp = self.recvall(sock).decode('utf-8')
427 sock.close()
H A Dtest_tls.py504 (resp, sock) = self.post_ssl(
523 sock=sock,
545 (resp, sock) = self.get_ssl(start=True)
549 sock.close()
561 (resp, sock) = self.get_ssl(
574 headers={'Host': 'localhost', 'Connection': 'close'}, sock=sock
604 (_, sock) = self.post_ssl(
631 sock=sock,
H A Dtest_static.py234 sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
235 sock.bind(temp_dir + '/assets/unix_socket')
239 sock.close()
265 _, sock = self.get(url='/', start=True, no_recv=True)
268 assert sock.recv(1) == b'H', 'client 1'
270 assert sock.recv(1) == b'T', 'client 1 again'
273 sock.close()
H A Dtest_go_application.py94 (resp, sock) = self.post(
114 sock=sock,
H A Dtest_upstreams_rr.py293 _, sock = self.get(
303 socks.append(sock)
323 _, sock = self.get(start=True, no_recv=True)
324 socks.append(sock)
360 self.http(b'', sock=socks[i], raw=True)['body'] == ''
364 self.http(b"""0123456789""", sock=socks2[i], raw=True)['body']
H A Dtest_java_application.py827 (resp, sock) = self.post(
847 sock=sock,
1004 (_, sock) = self.get(
1014 socks.append(sock)
1020 for sock in socks:
1021 resp = self.recvall(sock).decode('utf-8')
1031 sock.close()
/unit/test/unit/applications/
H A Dwebsockets.py46 _, sock = self.get(
58 resp += sock.recv(4096).decode()
64 return (resp, sock, key)
72 def frame_read(self, sock, read_timeout=60): argument
73 def recv_bytes(sock, bytes): argument
105 data = recv_bytes(sock, 2)
108 data = recv_bytes(sock, 8)
112 mask_bits = recv_bytes(sock, 4)
117 data = recv_bytes(sock, length)
195 sock.sendall(frame)
[all …]
/unit/test/unit/
H A Dhttp.py45 sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
49 sock = kwargs['wrapper'](sock, server_hostname=server_hostname)
53 sock.connect(connect_args)
55 sock.close()
59 sock = kwargs['sock']
88 sock.sendall(req)
122 sock.close()
125 return (resp, sock)
173 def recvall(self, sock, **kwargs): argument
181 rlist = select.select([sock], [], [], timeout)[0]
[all …]
H A Dutils.py54 with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as sock:
56 sock.settimeout(5)
57 sock.connect(('127.0.0.1', port))
/unit/pkg/docker/
H A Ddocker-entrypoint.sh7 …{http_code}' -X PUT --data-binary @$1 --unix-socket /var/run/control.unit.sock http://localhost/$2`
27 /usr/sbin/$1 --control unix:/var/run/control.unit.sock
29 …while [ ! -S /var/run/control.unit.sock ]; do echo "$0: Waiting for control socket to be created..…
32 /usr/bin/curl -s -X GET --unix-socket /var/run/control.unit.sock http://localhost/
60 …while [ -S /var/run/control.unit.sock ]; do echo "$0: Waiting for control socket to be removed..."…

123