G
Guest
How do you retrieve the streaming 'parts' of a multipart message from a
WebRequest?
Here is the situation.
A WebRequest is submitted to a server (http://TheServer:80/GetMedia?ID=1).
This causes the server to push/stream a multipart message back to the client
in the following format:
HTTP/1.1 200 OK
Date: Fri, 24 Feb 2006 12:01:31 CST
Server: MyServer/1.0
Content-type: multipart/x-mixed-replace;boundary=Separator
--Separator
Content-Type: image/jpeg
Content-Transfer-Encoding: binary
Content-Length: 11346
<binary data>
--Separator
Content-Type: image/jpeg
Content-Transfer-Encoding: binary
Content-Length: 11346
<binary data>
--Separator--
In the callback for BeginGetResponse, the get response I get the response
from the EndGetReponse method. The response stream contains the first 'part'
(everything between the first and second '--Separator', ie both the headers
and binary data). How do I get the rest of the message parts?
WebRequest?
Here is the situation.
A WebRequest is submitted to a server (http://TheServer:80/GetMedia?ID=1).
This causes the server to push/stream a multipart message back to the client
in the following format:
HTTP/1.1 200 OK
Date: Fri, 24 Feb 2006 12:01:31 CST
Server: MyServer/1.0
Content-type: multipart/x-mixed-replace;boundary=Separator
--Separator
Content-Type: image/jpeg
Content-Transfer-Encoding: binary
Content-Length: 11346
<binary data>
--Separator
Content-Type: image/jpeg
Content-Transfer-Encoding: binary
Content-Length: 11346
<binary data>
--Separator--
In the callback for BeginGetResponse, the get response I get the response
from the EndGetReponse method. The response stream contains the first 'part'
(everything between the first and second '--Separator', ie both the headers
and binary data). How do I get the rest of the message parts?