// RESPONSE (OUTER CALL) private void BytesRespondedHandler(IEnumerable <byte> data, byte prefix) { if (!_requestToRemoteSent) { _recorder.RecordError(this.GetType().Name, "Trying to receive response without outer call"); return; } if (!_requestCalculator.ValidateCurrentIndex(prefix)) { _recorder.RecordError(this.GetType().Name, "Received response with wrong index"); return; } _requestToRemoteSent = false; Responded?.Invoke(data); }
private void TriggerResponded(IRequest request, IResponder responder) { Responded?.Invoke(this, responder, request); }
protected internal void OnResponded(IHttpContext context) { Task.Run(() => Responded?.Invoke(this, context)); }
protected virtual void OnResponded(IRequest request, IResponse response) => Responded?.Invoke(request, response);
public void TriggerReceiveResponse(IEnumerable <byte> data) { Responded?.Invoke(data); }