Return a generator of data read from the socket when the tty setting is enabled.
(socket)
| 125 | |
| 126 | |
| 127 | def frames_iter_tty(socket): |
| 128 | """ |
| 129 | Return a generator of data read from the socket when the tty setting is |
| 130 | enabled. |
| 131 | """ |
| 132 | while True: |
| 133 | result = read(socket) |
| 134 | if len(result) == 0: |
| 135 | # We have reached EOF |
| 136 | return |
| 137 | yield result |
| 138 | |
| 139 | |
| 140 | def consume_socket_output(frames, demux=False): |