Asynchronously stream an image accross domains?

Asynchronously stream an image accross domains?

am 21.04.2008 17:34:02 von ghause

Is Webclient.downloadDataAsync the best way to achieve this?

I'd like to write an asynchronous handler that can return a byte array, but
I'm not sure what *Begin and *End methods would be best suited to this.

My goal here is to stream images through a proxy server whose uri is served
from an external web service. If you think I am headed in the wrong
direction, please let me know.

RE: Asynchronously stream an image accross domains?

am 21.04.2008 17:45:01 von brucebarker

there are two async callbacks you need to do.

1) async connection open, BeginGetResponse() off the webrequest
2) async read: BeginRead off the ResponseStream

the second async handler woulle be setup in the first async handler.


-- bruce (sqlwork.com)


"ghause" wrote:

> Is Webclient.downloadDataAsync the best way to achieve this?
>
> I'd like to write an asynchronous handler that can return a byte array, but
> I'm not sure what *Begin and *End methods would be best suited to this.
>
> My goal here is to stream images through a proxy server whose uri is served
> from an external web service. If you think I am headed in the wrong
> direction, please let me know.