Creating an HTTP Streaming Client in Silverlight
I read and played with WebClient and HttpWebRequest classes. Both of these classes allow you to make requests to an http server. Once you make the request, you give a callback that is invoked once the response is received so you can happily examine the response. Let's say your HTTP server is streaming a file, or it wants to hold on to your request and sends messages as necessary from the same connection. To be able to work with such a server, your http client must be able to read the data as soon as it is available without requiring the response to be received completely. After searching silverlight forums I found a solution. The solution assumes that you have a control on the server code or the response you are getting is bigger than 4KB (IE buffers upto 4KB). Here is the code snipped for your client side: HttpWebRequest request = (HttpWebRequest)WebRequest.Create(uri); request.Method = "POST"; request.AllowReadStreamBuffering = false; try { request.BeginGetResponse(On...