Wait till connection is closed or timeout reached. Buffer any input received during this time.
(self, timeout=None)
| 260 | self._channels[channel] += data |
| 261 | |
| 262 | def run_forever(self, timeout=None): |
| 263 | """Wait till connection is closed or timeout reached. Buffer any input |
| 264 | received during this time.""" |
| 265 | if timeout: |
| 266 | start = time.time() |
| 267 | while self.is_open() and time.time() - start < timeout: |
| 268 | self.update(timeout=(timeout - time.time() + start)) |
| 269 | else: |
| 270 | while self.is_open(): |
| 271 | self.update(timeout=None) |
| 272 | @property |
| 273 | def returncode(self): |
| 274 | """ |