System.Net.WebConnection.NextRead C# (CSharp) Method

NextRead() private method

private NextRead ( ) : void
return void
		internal void NextRead ()
		{
			lock (this) {
				Data.request.FinishedReading = true;
				string header = (sPoint.UsesProxy) ? "Proxy-Connection" : "Connection";
				string cncHeader = (Data.Headers != null) ? Data.Headers [header] : null;
				bool keepAlive = (Data.Version == HttpVersion.Version11 && this.keepAlive);
				if (cncHeader != null) {
					cncHeader = cncHeader.ToLower ();
					keepAlive = (this.keepAlive && cncHeader.IndexOf ("keep-alive", StringComparison.Ordinal) != -1);
				}

				if ((socket != null && !socket.Connected) ||
				   (!keepAlive || (cncHeader != null && cncHeader.IndexOf ("close", StringComparison.Ordinal) != -1))) {
					Close (false);
				}

				busy = false;
				if (priority_request != null) {
					SendRequest (priority_request);
					priority_request = null;
				} else {
					SendNext ();
				}
			}
		}
		

Usage Example

Esempio n. 1
0
 internal void ForceCompletion()
 {
     if (!nextReadCalled)
     {
         if (contentLength == Int32.MaxValue)
         {
             contentLength = 0;
         }
         nextReadCalled = true;
         cnc.NextRead();
     }
 }
All Usage Examples Of System.Net.WebConnection::NextRead