mirror of
https://github.com/ading2210/libcurl.js.git
synced 2025-05-12 22:10:01 -04:00
add support for parallel requests
This commit is contained in:
parent
09ff32dcd3
commit
248d5b0161
4 changed files with 75 additions and 43 deletions
|
@ -2,7 +2,7 @@ import asyncio
|
|||
from websockets.server import serve
|
||||
from websockets.exceptions import ConnectionClosed
|
||||
|
||||
buffer_size = 64*1024
|
||||
buffer_size = 1024*1024
|
||||
|
||||
class Connection:
|
||||
def __init__(self, ws, path):
|
||||
|
@ -48,7 +48,7 @@ async def connection_handler(websocket, path):
|
|||
await asyncio.gather(ws_handler, tcp_handler)
|
||||
|
||||
async def main():
|
||||
async with serve(connection_handler, "127.0.0.1", 6001):
|
||||
async with serve(connection_handler, "127.0.0.1", 6001, subprotocols=["binary"]):
|
||||
await asyncio.Future()
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue