Esempio n. 1
0
        protected override void OnClosed()
        {
            base.OnClosed();

            // clean up the CBT after transitioning to the closed state
            ChannelBindingUtility.Dispose(ref _channelBindingToken);
        }
Esempio n. 2
0
        protected override async Task OnCloseAsync(CancellationToken token)
        {
            TimeoutHelper timeoutHelper = new TimeoutHelper(TimeoutHelper.GetOriginalTimeout(token));
            // send back EOF and then recycle the connection
            await Connection.WriteAsync(SingletonEncoder.EndBytes, 0, SingletonEncoder.EndBytes.Length, true, timeoutHelper.RemainingTime());

            connectionDemuxer.ReuseConnection(rawConnection, timeoutHelper.RemainingTime());

            ChannelBindingUtility.Dispose(ref channelBindingToken);
        }