A fallback action. Send a raw command to the server
187444
function unknownCommand (ev) {
        var raw_cmd = ev.command + ' ' + ev.params.join(' ');
        this.app.connections.active_connection.gateway.raw(raw_cmd);
    }
913566
def send(self, command, *args, **kwargs):
        
        args = list(args)
        if kwargs:
            args.append(kwargs)

        method = self.proxy
        for elt in command.split('.'):
            method = getattr(method, elt)

        try:
            return method(*args)
        except Fault as err:
            if err.faultCode == 121:
                return {}
            elif err.faultCode == 321:
                return []
            raise DokuWikiError(err)
        except ExpatError as err:
            if str(err) != ERR:
                raise DokuWikiError(err)
102540
async def execute_command(
        self, *args: bytes, timeout: DefaultNumType = _default
    ) -> SMTPResponse:
        
        if timeout is _default:
            timeout = self.timeout  # type: ignore

        self._raise_error_if_disconnected()

        try:
            response = await self.protocol.execute_command(  # type: ignore
                *args, timeout=timeout
            )
        except SMTPServerDisconnected:
            # On disconnect, clean up the connection.
            self.close()
            raise

        # If the server is unavailable, be nice and close the connection
        if response.code == SMTPStatus.domain_unavailable:
            self.close()

        return response
156738
function (command, callback) {

    var self = this;
    var callbacked = false;

    function handleError (err) {
      debug(err);

      if (_.isString(err)) {
        if (_.isEmpty(err)) {
          err = self.description;
        }
        err = new BusinessRuleError(err);
      } else if (err instanceof BusinessRuleError) {
        // do nothing
      } else {
        err = new BusinessRuleError(err.message || self.description);
      }

      callbacked = true;
      callback(err);
    }

    var payload;
    if (!this.payload || this.payload === '') {
      payload = command;
    } else {
      payload = dotty.get(command, this.payload);
    }

    try {
      if (this.preLoadConditionFn.length === 2) {
        this.preLoadConditionFn(_.cloneDeep(payload), function (err) {
          if (err) {
            return handleError(err);
          }
          callbacked = true;
          callback(null);
        });
      } else {
        var err = this.preLoadConditionFn(_.cloneDeep(payload));
        if (err) {
          return handleError(err);
        }
        callbacked = true;
        callback(null);
      }
    } catch (err) {
      if (!callbacked) {
        return handleError(err);
      }
      throw err;
    }
  }
973290
def _sendCommand(self, command):
        

        if(self.process is not None):
            try:
                if logger.isEnabledFor(logging.DEBUG):
                    logger.debug("Command: {}".format(command).strip())
                self.process.stdin.write(command.encode('utf-8', 'replace'))
                self.process.stdin.flush()
            except:
                msg = "Error when sending: {}"
                if logger.isEnabledFor(logging.ERROR):
                    logger.error(msg.format(command).strip(), exc_info=True)
1289263
def send_request(cls, sock, working_dir, command, *arguments, **environment):
    """"""
    for argument in arguments:
      cls.write_chunk(sock, ChunkType.ARGUMENT, argument)

    for item_tuple in environment.items():
      cls.write_chunk(sock,
                      ChunkType.ENVIRONMENT,
                      cls.ENVIRON_SEP.join(cls._decode_unicode_seq(item_tuple)))

    cls.write_chunk(sock, ChunkType.WORKING_DIR, working_dir)
    cls.write_chunk(sock, ChunkType.COMMAND, command)
275574
def send_stderr(cls, sock, payload):
    """"""
    cls.write_chunk(sock, ChunkType.STDERR, payload)
1054831
function cmd (action, url, params, fn) {
      var c, f;

      c = {
        cmd: action + ' ' + me._selectedEnv.apiroot + url
      };

      c.params = ('object' === typeof(params)) ? params: {};
      c.params.eventKey = key();
      c.params.sid = sid();

      f = ('function' === typeof(fn)) ? fn: console.log;
      _commandQ['' + c.params.eventKey] = f;

      return JSON.stringify(c);
    }
651529
def _command(self, msg):
        """"""
        logger.debug('send command to %s', "ws://{}:{}".format(self.ip, self.port));
        try:
            websocket = yield from websockets.connect(
                "ws://{}:{}".format(self.ip, self.port), timeout=self.timeout_connect)
        except:
            logger.debug('command failed to connect to %s', "ws://{}:{}".format(self.ip, self.port));
            return False

        logger.debug('command websocket connected to %s', "ws://{}:{}".format(self.ip, self.port));

        try:
            yield from self._send_register_payload(websocket)

            if not self.client_key:
                raise PyLGTVPairException("Unable to pair")

            yield from websocket.send(json.dumps(msg))

            if msg['type'] == 'request':
                raw_response = yield from websocket.recv()
                self.last_response = json.loads(raw_response)

        finally:
            logger.debug('close command connection to %s', "ws://{}:{}".format(self.ip, self.port));
            yield from websocket.close()
618195
public void doBack(String command)
	{
		if (command != null)
			if (command.startsWith("#"))
				command = command.substring(1);
		String javaCommand = this.popHistory(2, false);		// Current command
		Util.getLogger().info("Browser back: java command=" + javaCommand + "  browser command=" + command);
		if (javaCommand == null)
			javaCommand = command;
		if ((javaCommand == null) || (javaCommand.length() == 0))
			javaCommand = this.getInitialCommand(false);
		javaCommand = this.cleanCommand(javaCommand);
		javaCommand = UrlUtil.addURLParam(javaCommand, Params.APPLET, this.getClass().getName());
		Util.getLogger().info("doBack " + javaCommand);
		BaseApplet.handleAction(javaCommand, this, this, Constants.DONT_PUSH_TO_BROWSER);
	}
1063102
def send_command(self, cmd, priority=False):
        
        if priority:
            self._pending.insert(0, cmd)
        else:
            self._pending.append(cmd)
        self._pending_size += len(cmd)

        if self._pending_size > DEFAULT_PENDING_SIZE:
            yield self._flush_pending()
969817
def flexifunction_command_ack_send(self, command_type, result, force_mavlink1=False):
                '''
                

                '''
                return self.send(self.flexifunction_command_ack_encode(command_type, result), force_mavlink1=force_mavlink1)
1353330
def dbcmd(action, *args):
    
    global sock
    if sock is None:
        sock = zeromq.Socket(
            'tcp://%s:%s' % (config.dbserver.host, DBSERVER_PORT),
            zeromq.zmq.REQ, 'connect').__enter__()
        # the socket will be closed when the calculation ends
    res = sock.send((action,) + args)
    if isinstance(res, parallel.Result):
        return res.get()
    return res
1134127
def send_command_response(self,
                              source: list,
                              command: str,
                              *args,
                              **kwargs):
        
        args = _json.dumps(args).encode('utf8')
        kwargs = _json.dumps(kwargs).encode('utf8')
        if isinstance(source, list):
            frame = (*source, b'', command.encode('utf8'), args, kwargs)
        else:
            frame = (b'', command.encode('utf8'), args, kwargs)
        if self._run_control_loop:
            self.add_callback(self.command_socket.send_multipart, frame)
        else:
            self.command_socket.send_multipart(frame)
571026
def run_with_fallbacks(commands, options = {})
      commands.each do |command|
        result = run_command(command, options)
        return result if result.success?
      end
      SshConnection::ExecResult.new(1)
    end
990795
function sendCommand(method, url, payload, skipQueue) {
    if (!self.connected) {
      debug('Queueing %s %s', method, url);
      return new P(function(resolve, reject) {
        var p = P.method(function() {
          debug('Dequeueing %s %s', method, url);
          return _sendCommand(method, url, payload)
            .then(resolve)
            .catch(reject);
        });
        if (skipQueue) {
          pendingCommands.splice(0, 0, p);
        } else {
          pendingCommands.push(p);
        }
      });
    }
    return _sendCommand(method, url, payload);
  }
1192833
def raw_command(self, lun, netfn, raw_bytes):
        
        return self.interface.send_and_receive_raw(self.target, lun, netfn,
                                                   raw_bytes)