Read all frames sent to the transport.
(self)
| 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 | """ |