Microsoft.Protocols.TestTools.StackSdk.BranchCache.Pchc.PCHCServer.SendByte C# (CSharp) Method

SendByte() private method

Send the response payload.
private SendByte ( byte reponseMessagePayload ) : void
reponseMessagePayload byte The response message payload.
return void
        private void SendByte(byte[] reponseMessagePayload)
        {
            try
            {
                lock (this.initialQueue)
                {
                    lock (this.segmentQueue)
                    {
                        this.httpServerTransport.Send(
                            null,
                            reponseMessagePayload,
                            this.initialQueue.Count != 0 ? this.initialQueue.Peek() : this.segmentQueue.Peek());
                    }
                }
            }
            catch (ObjectDisposedException e)
            {
                if (this.logger != null)
                {
                    this.logger.AddWarning(
                        string.Format("Object disposed exception is catched, detailed information: {0}.", e.Message));
                }
                else
                {
                    throw;
                }
            }

            lock (this.initialQueue)
            {
                lock (this.segmentQueue)
                {
                    // Consume the http listener context after the response is sent.
                    this.initialQueue.Clear();
                    this.segmentQueue.Clear();
                }
            }
        }