I want to do something like this
{
HttpWebRequest WebRequestObject = (HttpWebRequest)HttpWebRequest.Create("http://google.com");
WebRequestObject.KeepAlive = true;
//do stuff
WebRequestObject.Something("http://www.google.com/intl/en_ALL/images/logo.gif");
//more here
}
How do i keep the connection alive and go to multiple urls using that same alive connection?
You simply use another HttpWebRequest object and provided that you set KeepAlive to true in both cases the internal HTTP connection manager in the .NET Framework should handle things for you. See the MSDN documentation for the KeepAlive property for more info on this.
You simply use another HttpWebRequest object and provided that you set KeepAlive to true in both cases the internal HTTP connection manager in the .NET Framework should handle things for you. See the MSDN documentation for the KeepAlive property for more info on this.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With