MCPcopy Index your code
hub / github.com/python-websockets/websockets / junk

Method junk

tests/asyncio/test_client.py:448–452  ·  view source on GitHub ↗
(reader, writer)

Source from the content-addressed store, hash-verified

446 """Client closes the connection when receiving non-HTTP response from server."""
447
448 async def junk(reader, writer):
449 await asyncio.sleep(MS) # wait for the client to send the handshake request
450 writer.write(b"220 smtp.invalid ESMTP Postfix\r\n")
451 await reader.read(4096) # wait for the client to close the connection
452 writer.close()
453
454 server = await asyncio.start_server(junk, "localhost", 0)
455 host, port = get_host_port(server)

Callers

nothing calls this directly

Calls 3

readMethod · 0.80
writeMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected