private HttpConnection GetConnectionPrivate(Uri uri, Uri proxy) { HttpConnection conn = new HttpConnection(this, uri, proxy); conn.SetBusy(true); conn.Connect(); return conn; }
// make sure the connection is still open and from the same host public HttpConnection GetConnnection(Uri uri, Uri proxy, HttpConnection liveConnection) { if (liveConnection != null && liveConnection.IsConnected() && liveConnection.Uri.Host.ToLower() == uri.Host.ToLower()) { return liveConnection; } else { liveConnection.Close(); return GetConnectionPrivate(uri, proxy); } }
private Connection GetConnectionPrivate(Uri uri, Uri proxy) { Connection conn = new HttpConnection(this, uri, proxy); return InitiateConnection(conn); }