/// <summary> /// Writes the go away frame. /// </summary> /// <param name="code">The code.</param> public void WriteGoAway(ResetStatusCode code) { //if there were no streams opened if (_lastId == -1) { _lastId = 0; //then set lastId to 0 as spec tells. (See GoAway chapter) } var frame = new GoAwayFrame(_lastId, code); _writeQueue.WriteFrame(frame); }
private void HandleGoAwayFrame(GoAwayFrame goAwayFrame) { //TODO handle additional debug info _goAwayReceived = true; Http2Logger.LogDebug("GoAway frame received"); Dispose(); }
/// <summary> /// Writes the GOAWAY frame. /// </summary> /// <param name="code">The Reset Status code.</param> public void WriteGoAway(ResetStatusCode code) { //if there were no streams opened if (_lastId == -1) { _lastId = 0; //then set lastId to 0 as spec tells. (See GoAway chapter) } var frame = new GoAwayFrame(_lastId, code); Http2Logger.LogDebug("Sending GOAWAY frame: stream id={0}, code={1}, last good id={2}", frame.StreamId, frame.StatusCode, frame.LastGoodStreamId); _writeQueue.WriteFrame(frame); }
private void HandleGoAwayFrame(GoAwayFrame goAwayFrame) { if (goAwayFrame.StreamId != 0) throw new ProtocolError(ResetStatusCode.ProtocolError, "GoAway stream id should always be null"); _goAwayReceived = true; Http2Logger.LogDebug("GoAway frame received with code {0}", goAwayFrame.StatusCode); Dispose(); }
private void HandleGoAwayFrame(GoAwayFrame goAwayFrame) { Http2Logger.LogDebug("GOAWAY frame: stream id={0}, status code={1}", goAwayFrame.StreamId, goAwayFrame.StatusCode); if (goAwayFrame.StreamId != 0) throw new ProtocolError(ResetStatusCode.ProtocolError, "GoAway Stream id should always be null"); _goAwayReceived = true; Http2Logger.LogDebug("last successful id = {0}", goAwayFrame.LastGoodStreamId); Dispose(); }