Sends the given command to the server.

        Args:
            command (str): Command to send to the server.

        Raises:
            ConnectionResetError: If the connection with the server is lost.
            (Shouldn't it raise BrokenPipeError too ?)

async def send_command(self, command):
        """
        Sends the given command to the server.

        Args:
            command (str): Command to send to the server.

        Raises:
            ConnectionResetError: If the connection with the server is lost.
            (Shouldn't it raise BrokenPipeError too ?)
        """
        command = "{}\r\n".format(command).encode("ascii", errors="backslashreplace")

        self.write(command)

        # Don't forget to drain or the command will stay buffered:
        await self.drain()