bpo-32356: idempotent pause_/resume_reading; new is_reading method. (#4914)

This commit is contained in:
Yury Selivanov 2017-12-18 17:03:23 -05:00 committed by GitHub
parent 2d8f06382e
commit d757aaf9dd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 87 additions and 24 deletions

View file

@ -44,6 +44,10 @@ class BaseTransport:
class ReadTransport(BaseTransport):
"""Interface for read-only transports."""
def is_reading(self):
"""Return True if the transport is receiving."""
raise NotImplementedError
def pause_reading(self):
"""Pause the receiving end.