public void GetRequestProcessingLimits(out int maxAccepts, out int maxRequests) { PumpLimits limits = _pumpLimits; maxAccepts = limits.MaxOutstandingAccepts; maxRequests = limits.MaxOutstandingRequests; }
/// <summary> /// These are merged as one call because they should be swapped out atomically. /// This controls how many requests the server attempts to process concurrently. /// </summary> /// <param name="maxAccepts">The maximum number of pending request receives.</param> /// <param name="maxRequests">The maximum number of active requests being processed.</param> public void SetRequestProcessingLimits(int maxAccepts, int maxRequests) { _pumpLimits = new PumpLimits(maxAccepts, maxRequests); if (_listener.IsListening) { // Kick the pump in case we went from zero to non-zero limits. OffloadStartNextRequest(); } }