def recv(self, size):
        if self._closed:
            raise SocketClosedError()

        if self._buf:
            # We already have data read previously.
            out = self._buf[:size]
            self._buf = self._buf[size:]
            return ValueEvent(out)
        else:
            return ReceiveEvent(self, size)
Read at most size bytes of data from the socket.
dataset/ETHPy150Open beetbox/beets/beets/util/bluelet.py/Connection.recv