Esempio n. 1
0
        public void Close(ResetStatusCode code)
        {
            if (Closed || Idle)
            {
                return;
            }

            OnFrameSent = null;

            Http2Logger.LogDebug("Total outgoing data frames volume " + SentDataAmount);
            Http2Logger.LogDebug("Total frames sent: {0}", FramesSent);
            Http2Logger.LogDebug("Total frames received: {0}", FramesReceived);

            if (code == ResetStatusCode.Cancel || code == ResetStatusCode.InternalError)
            {
                WriteRst(code);
            }

            _flowCrtlManager.StreamClosedHandler(this);

            Closed = true;

            if (OnClose != null)
            {
                OnClose(this, new StreamClosedEventArgs(_id));
            }

            OnClose = null;

            Http2Logger.LogDebug("Stream closed " + _id);
        }
Esempio n. 2
0
        public void Dispose()
        {
            if (Disposed)
            {
                return;
            }

            Http2Logger.LogDebug("Total outgoing data frames volume " + SentDataAmount);

            if (OnClose != null)
            {
                OnClose(this, new StreamClosedEventArgs(_id));
            }

            Http2Logger.LogDebug("Stream closed " + _id);

            OnClose = null;
            _flowCrtlManager.StreamClosedHandler(this);
            Disposed = true;
        }