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

Method sent_frames

tests/legacy/test_protocol.py:269–288  ·  view source on GitHub ↗

Read all frames sent to the transport.

(self)

Source from the content-addressed store, hash-verified

267 self.loop.run_until_complete(self.protocol.close_connection_task)
268
269 def sent_frames(self):
270 """
271 Read all frames sent to the transport.
272
273 """
274 stream = asyncio.StreamReader(loop=self.loop)
275
276 for (data,), kw in self.transport.write.call_args_list:
277 stream.feed_data(data)
278 self.transport.write.call_args_list = []
279 stream.feed_eof()
280
281 frames = []
282 while not stream.at_eof():
283 frames.append(
284 self.loop.run_until_complete(
285 Frame.read(stream.readexactly, mask=self.protocol.is_client)
286 )
287 )
288 return frames
289
290 def last_sent_frame(self):
291 """

Callers 2

last_sent_frameMethod · 0.95
assertFramesSentMethod · 0.95

Calls 5

feed_dataMethod · 0.95
feed_eofMethod · 0.95
at_eofMethod · 0.95
appendMethod · 0.80
readMethod · 0.80

Tested by

no test coverage detected