chuncked streaming: dynamic generated content

"이희승 (Trustin Lee)" trustin at gmail.com
Thu Nov 11 00:01:34 EST 2010


drakkan wrote:
> Hi,
> 
> I need to stream large dinamyc generated content, I have a process that
> write data to a file descriptor and I need to read data from this file
> descriptor and serve it via http. I looked at httpstaticfileserver example
> but here the things are a bit different:
> 
> 1) I don't know the length of the data to stream, so I have to serve as
> chunk without know the total length
> 2) I need to serve file as chunk, but I cannot be sure that the chuncked
> size is ever available when I read from the file descriptor, maybe I have to
> fill a queue and read from that queue when enough data is available
> 3) I need to manage error and not exit on the first error (maybe this is the
> simplest thing to do)
> 
> is netty suitable for this task?

Yes, it is.

> can you please give me some directions?

You will have to implement your own ChunkedInput and write it to the
pipeline which contains a ChunkedWriteHandler.

HTH

-- 
Trustin Lee - http://gleamynode.net/


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 290 bytes
Desc: OpenPGP digital signature
Url : http://lists.jboss.org/pipermail/netty-users/attachments/20101111/b2a60add/attachment.bin 


More information about the netty-users mailing list