J
Jeff
Hello
Suppose I set up an http handler to stream data from a very large file to a
web client.
Would it be possible to communicate with the handler whilst it's returning
data in order to reposition the file position?
I guess this is a little bit like video or audio controls in an http
streaming control..
So if I had something like
int count = imgStream.Read(buffer, 0, buffersize);
while (count > 0)
{
/* Reposition output-stream based on user request here */
context.Response.OutputStream.Write(buffer, 0, count);
count = imgStream.Read(buffer, 0, buffersize);
}
inside the ProcessRequest method of my http handler, then would it be
possible to reposition the output stream inside the while loop. Maybe I
could do this by means of a shared session variable which could be updated
by a separate handler or something? Or is there a better approach within
asp.net?
I know there are probably existing technolgies that can solve this problem
for me but I'd like to understand how to do this sort of thing at a low
level within in asp.net.
Thanks in advance for any help.
Jeff
Suppose I set up an http handler to stream data from a very large file to a
web client.
Would it be possible to communicate with the handler whilst it's returning
data in order to reposition the file position?
I guess this is a little bit like video or audio controls in an http
streaming control..
So if I had something like
int count = imgStream.Read(buffer, 0, buffersize);
while (count > 0)
{
/* Reposition output-stream based on user request here */
context.Response.OutputStream.Write(buffer, 0, count);
count = imgStream.Read(buffer, 0, buffersize);
}
inside the ProcessRequest method of my http handler, then would it be
possible to reposition the output stream inside the while loop. Maybe I
could do this by means of a shared session variable which could be updated
by a separate handler or something? Or is there a better approach within
asp.net?
I know there are probably existing technolgies that can solve this problem
for me but I'd like to understand how to do this sort of thing at a low
level within in asp.net.
Thanks in advance for any help.
Jeff