1
0
Fork 0
firefox/testing/web-platform/tests/websockets/handlers/receive-backpressure_wsh.py
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

14 lines
343 B
Python
Executable file

#!/usr/bin/python
import time
def web_socket_do_extra_handshake(request):
# Turn off permessage-deflate, otherwise it shrinks our 8MB buffer to 8KB.
request.ws_extension_processors = []
def web_socket_transfer_data(request):
# Wait two seconds to cause backpressure.
time.sleep(2);
request.ws_stream.receive_message()