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

Method parse

src/websockets/cli.py:57–62  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

55 self.messages: SimpleQueue[str] = SimpleQueue()
56
57 def parse(self) -> Generator[None, None, None]:
58 while True:
59 sys.stdout.write("> ")
60 sys.stdout.flush()
61 line = yield from self.reader.read_line(sys.maxsize)
62 self.messages.put(line.decode().rstrip("\r\n"))
63
64 def connection_made(self, transport: asyncio.BaseTransport) -> None:
65 self.parser = self.parse()

Callers 1

connection_madeMethod · 0.95

Calls 4

read_lineMethod · 0.80
writeMethod · 0.45
putMethod · 0.45
decodeMethod · 0.45

Tested by

no test coverage detected