protected function send($command, $parameters = array())
    {
        $this->tag ++;

        $line = 'TAG' . $this->tag . ' ' . $command;

        if (!is_array($parameters)) {
            $parameters = array($parameters);
        }

        foreach ($parameters as $parameter) {
            if (is_array($parameter)) {
                if (fputs($this->socket, $line . ' ' . $parameter[0] . "\r\n") === false) {
                    return false;
                }

                if (strpos($this->getLine(), '+ ') === false) {
                    return false;
                }

                $line = $parameter[1];
            } else {
                $line .= ' ' . $parameter;
            }
        }

        $this->debug('Sending: '.$line);

        return fputs($this->socket, $line . "\r\n");
    }