async def METHOD_NAME(self) -> bytes:
    """
    Raises:
        TransportError
    """
    data = bytearray()
    while True:
        if self.keepalive:
            with trio.move_on_after(self.keepalive) as cancel_scope:
                event = await self._next_ws_event()
            if cancel_scope.cancelled_caught:
                self.logger.debug("Sending keep alive ping")
                await self._net_send(Ping())
                continue
        else:
            event = await self._next_ws_event()
        if isinstance(event, CloseConnection):
            self.logger.debug("Connection closed", code=event.code, reason=event.reason)
            try:
                await self._net_send(event.response())
            except LocalProtocolError:
                # TODO: exception occurs when ws.state is already closed...
                pass
            raise TransportClosedByPeer("Peer has closed connection")
        elif isinstance(event, BytesMessage):
            # TODO: check that data doesn't go over MAX_BIN_LEN (1 MB)
            # Msgpack will refuse to unpack it so we should fail early on if that happens
            data += event.data
            if event.message_finished:
                return data
        elif isinstance(event, Ping):
            self.logger.debug("Received ping and sending pong")
            await self._net_send(event.response())
        elif isinstance(event, Pong):
            # Nothing to do \o/
            self.logger.debug("Received pong")
        else:
            self.logger.warning("Unexpected event", ws_event=event)
            raise TransportError(f"Unexpected event: {event}")