import io


class MeteredFile(io.BufferedRandom):
    """Implement using a subclassing model."""

    def __init__(self, *args, **kwargs):
        pass

    def __enter__(self):
        pass

    def __exit__(self, exc_type, exc_val, exc_tb):
        pass

    def __iter__(self):
        pass

    def __next__(self):
        pass

    def read(self, size=-1):
        pass

    @property
    def read_bytes(self):
        pass

    @property
    def read_ops(self):
        pass

    def write(self, b):
        pass

    @property
    def write_bytes(self):
        pass

    @property
    def write_ops(self):
        pass


class MeteredSocket:
    """Implement using a delegation model."""

    def __init__(self, socket):
        pass

    def __enter__(self):
        pass

    def __exit__(self, exc_type, exc_val, exc_tb):
        pass

    def recv(self, bufsize, flags=0):
        pass

    @property
    def recv_bytes(self):
        pass

    @property
    def recv_ops(self):
        pass

    def send(self, data, flags=0):
        pass

    @property
    def send_bytes(self):
        pass

    @property
    def send_ops(self):
        pass
