gjulianm
gjulianm

Reputation: 834

Are KeepAlive connections supported on Windows Phone 7?

I was trying to use an open (streaming) connection on the phone, using Hammock library. The problem is that Windows Phone doesn't seem to accept KeepAlive connections (WebRequest.KeepAlive is not available), and I would like to know if there's any way to use them.

Thanks!

Upvotes: 2

Views: 408

Answers (1)

Catalin M.
Catalin M.

Reputation: 652

It's possible :

        HttpWebRequest request = HttpWebRequest.CreateHttp(new Uri(@"http://www.mysite.com", UriKind.Absolute)) as HttpWebRequest;
        request.Headers["Connection"] = "Keep-Alive";

Upvotes: 2

Related Questions