private. remoted request next
170385
@AsCallback public void _rq(long l, int id) {
        if ( doOnSubscribe != null ) {
            doOnSubscribe.add( () -> _rq(l, id) );
        } else {
            SubscriberEntry se = getSE(id);
            if ( se != null ) {// ignore unknown subscribers
                se.addCredits(l);
            } else {
                Log.Warn(this, "ignored credits " + l + " on id " + id);
            }
            emitRequestNext();
        }
    }
1371677
protected void remoteInit() throws JMSException
    {
        QueueBrowserGetEnumerationQuery query = new QueueBrowserGetEnumerationQuery();
        query.setSessionId(session.getId());
        query.setBrowserId(browser.getId());
        QueueBrowserGetEnumerationResponse response = (QueueBrowserGetEnumerationResponse)transportEndpoint.blockingRequest(query);
        this.id = response.getEnumId();
        log.debug("Remote queue browser enumeration ID is "+id);
    }
443050
function LazyRelayInReq(conn, reqFrame) {
    this.channel = null;
    this.conn = null;
    this.start = null;
    this.remoteAddr = null;
    this.logger = null;
    this.peer = null;
    this.outreq = null;
    this.reqFrame = null;
    this.id = null;
    this.serviceName = null;
    this.callerName = null;
    this.timeout = null;
    this.alive = null;
    this.operations = null;
    this.timeHeapHandle = null;
    this.endpoint = null;
    this.error = null;
    this.tracing = null;
    this.reqContFrames = [];
    this.hasRead = null;
    this.waitForIdentSlot = null;

    this.boundExtendLogInfo = extendLogInfo;
    this.boundOnIdentified = onIdentified;

    var self = this;

    function extendLogInfo(info) {
        return self.extendLogInfo(info);
    }

    function onIdentified(err) {
        // The ident descriptor will be cleared out of the peer when the ident
        // comes back, so this slot id will be invalid once ident happens.
        self.waitForIdentSlot = -1;

        if (err) {
            self.onError(err);
        } else {
            self.onIdentified();
        }
    }
}
838771
function (app, next) {

      if (hasDebug) {
        app.use(function (req, res, next) {

          var params = _.keys(req.params).length
            ? '\n' + formatJSON(req.params, '  ')
            : '-';

          debug('  params : '.cyan + params);

          next();
        });
      }

      if (hasVerbose) {
        app.use(morgan('' +
          '  ref    : :referrer\\n'.grey +
          '  uag    : :user-agent\\n'.grey +
          '  addr   : :remote-addr\\n'.grey +
          '  date   : :date'.grey, {
          immediate: true
        }));
      }

      next(null, app);
    }
894502
def process_request(self, req, resp):
        

        key = req.env['REMOTE_PORT'] + req.env['REMOTE_ADDR']
        val = self.cache.get(key, 0)

        if val == self.count:
            abort(exceptions.TooManyRequests(headers=self._error_headers))
        else:
            self.cache[key] = val + 1
834246
function authenticateClient (req, res, next) {
  Client.authenticate(req, function (err, client) {
    if (err) { return next(err) }
    req.client = client
    next()
  })
}
1320009
function DOMRequest() {
  this.onsuccess = null;
  this.onerror = null;
  this.error = null;
  this.result = undefined;
  this.readyState = "pending";
}
55142
function safeForwarded(req) {
	try {
		return forwarded(req, req.headers);
	} catch (error) {
		logger.error(error);
		return null;
	}
}
50476
function (req, res, next) {
            if (options.forceAuthorize) {
                return next();
            }
            var userId = req.oauth2.user.id;
            var clientId = req.oauth2.client.id;
            var scope = req.oauth2.req.scope;
            models.Permissions.isAuthorized(clientId, userId, scope,
                function (err, authorized) {
                    if (err) {
                        return next(err);
                    } else if (authorized) {
                        req.oauth2.res = {};
                        req.oauth2.res.allow = true;
                        server._respond(req.oauth2, res, function (err) {
                            if (err) {
                                return next(err);
                            }
                            return next(new AuthorizationError('Unsupported response type: '
                                + req.oauth2.req.type, 'unsupported_response_type'));
                        });
                    } else {
                        next();
                    }
                });
        }
1256985
function () {
        if (RemoteObjectTemplate.getPendingCallCount() == 0 && this.getCookie('session' + this.app) != this.session) {

            if (this.state != 'zombie') {
                this.state = 'zombie';
                this.expireController();

                RemoteObjectTemplate.enableSendMessage(false);  // Queue stuff as a zombie we will toss it later
                console.log('Another browser took over, entering zombie state');
            }
        }
    }
402847
def _send(self, **kwargs):
        
        if kwargs.get("dest_addr_long") is not None:
            self.zb.remote_at(**kwargs)
        else:
            self.zb.at(**kwargs)
44038
def remote(self) -> Optional[str]:
        
        if isinstance(self._transport_peername, (list, tuple)):
            return self._transport_peername[0]
        else:
            return self._transport_peername
888027
def remote_call(request, cls, method, args, kw):
    '''
    '''
    actor = request.actor
    name = 'remote_%s' % cls.__name__
    if not hasattr(actor, name):
        object = cls(actor)
        setattr(actor, name, object)
    else:
        object = getattr(actor, name)
    method_name = '%s%s' % (PREFIX, method)
    return getattr(object, method_name)(request, *args, **kw)
219788
function nextRequest() {
		// If there are no more middleware,
		// then resolve the middleware resolution
		if ( middleware.index == middleware.names.length ) {
			middleware.resolution.resolve();
		}

		// Attempt to invoke the next middleware
		middleware.next();
	}
862647
function transmit(callback) {
  // Will call next(data, next)
  // Expect OUR next to be called with (err) so we know if it worked
  var iRes;
  var iReq;
  var msg = null;
  var outpacket = {
    responses: [],
    requests : []
  };

  if (typeof callback !== 'function') {
    callback = this.transmitter;
  }
  if (!this.active || typeof callback !== 'function') {
    return this;
  }

  iRes = this.outbox.responses.length;
  iReq = this.outbox.requests.length;
  if (
    iRes > 0
    && iReq > 0
    && 'system.extension.dual-batch' in this.remoteComponents
  ) {
    // Use dual-batch extension to send it all at once
    outpacket = msg = {
      responses: this.outbox.responses,
      requests : this.outbox.requests
    };
    // Setting length=0 would preserve references and we want to renew them
    this.outbox.responses = [];
    this.outbox.requests = [];
  } else if (iRes > 0) {
    // Responses have priority over requests
    if (iRes > 1) {
      outpacket.responses = msg = this.outbox.responses;
      this.outbox.responses = [];
    } else {
      outpacket.responses.push(msg = this.outbox.responses.pop());
    }
  } else if (iReq > 0) {
    if (iReq > 1) {
      outpacket.requests = msg = this.outbox.requests;
      this.outbox.requests = [];
    } else {
      outpacket.requests.push(msg = this.outbox.requests.pop());
    }
  } else {
    return this;
  }

  // Send msg using callback
  setImmediate(
    callback,
    JSON.stringify(msg),
    confirmTransmit.bind(this, outpacket)
  );

  return this;
}
429639
def resolve_remote(uri, handlers):
    
    scheme = urlparse.urlsplit(uri).scheme
    if scheme in handlers:
        result = handlers[scheme](uri)
    else:
        req = urlopen(uri)
        encoding = req.info().get_content_charset() or 'utf-8'
        result = json.loads(req.read().decode(encoding),)
    return result
823681
def _try_next(self, get_more_allowed):
        """"""
        if not len(self.__data) and not self.__killed and get_more_allowed:
            self._refresh()
        if len(self.__data):
            coll = self.__collection
            return coll.database._fix_outgoing(self.__data.popleft(), coll)
        else:
            return None