mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-18 03:51:19 -10:00
* WebConnection.cs: turns out that socket.Connected is not useful until we actually try to send/receive data, even if the other end has already closed the socket. Added TryReconnect() and Connected. * WebConnectionData.cs: default value for StatusCode is 0 now. * WebConnectionGroup.cs: reuse the connection since the beginning, instead of opening up to ConnectionLimit and then reusing. * WebConnectionStream.cs: reopen the socket if we're trying to reuse one which fails on first write. svn path=/trunk/mcs/; revision=20117
40 lines
683 B
C#
40 lines
683 B
C#
//
|
|
// System.Net.WebConnectionData
|
|
//
|
|
// Authors:
|
|
// Gonzalo Paniagua Javier ([email protected])
|
|
//
|
|
// (C) 2003 Ximian, Inc (http://www.ximian.com)
|
|
//
|
|
|
|
using System.IO;
|
|
|
|
namespace System.Net
|
|
{
|
|
class WebConnectionData
|
|
{
|
|
public HttpWebRequest request;
|
|
public int StatusCode;
|
|
public string StatusDescription;
|
|
public WebHeaderCollection Headers;
|
|
public Version Version;
|
|
public Stream stream;
|
|
public byte [] initialData;
|
|
public int initialOffset;
|
|
public int length;
|
|
|
|
public void Init ()
|
|
{
|
|
request = null;
|
|
StatusCode = 0;
|
|
StatusDescription = null;
|
|
Headers = null;
|
|
stream = null;
|
|
initialData = null;
|
|
initialOffset = 0;
|
|
length = 0;
|
|
}
|
|
}
|
|
}
|
|
|