Esempio n. 1
0
        } // CanServiceAnotherRequest

        // Prepare for reading a new request off of the same socket
        protected override void PrepareForNewMessage()
        {
            if (_requestStream != null)
            {
                if (!_requestStream.FoundEnd)
                {
                    _requestStream.ReadToEnd();
                }
                _requestStream = null;
            }
        } // PrepareForNewRequest
        } // PrepareForNewRequest

        public override void OnInputStreamClosed()
        {
            // make sure we read to the end of the response stream
            if (_responseStream != null)
            {
                _responseStream.ReadToEnd();
                _responseStream = null;
            }

            // return socket to the cache
            ReturnToCache();
        } // OnInputStreamClosed