deadlock sending a large (~200MB) file from server to client

Norman Maurer norman.maurer at googlemail.com
Mon Sep 19 02:06:30 EDT 2011


Hi there,

why you not use ChunkedWriteHandler for this ? This is exactly what it is for...

Have a look at this example code:
http://docs.jboss.org/netty/3.2/xref/org/jboss/netty/example/http/file/HttpStaticFileServerHandler.html
http://docs.jboss.org/netty/3.2/xref/org/jboss/netty/example/http/file/HttpStaticFileServerPipelineFactory.html

Bye,
Norman


2011/9/19 michi <michi at cs.stanford.edu>:
> Hello,
>
> I'm trying to use netty to send large files (~200MB) from server to client
> over HTTP. I followed Trustin's suggestion here and used
> ChannelFutureListener to send files in chunks.
>
> http://www.jboss.org/netty/community#nabble-td2952981|a2953779
>
> However, write() gets stuck once in a while, and I'm not sure what's causing
> the deadlock. I have a simple program that reproduces the issue:
>
> https://github.com/m1ch1/netty-playground/blob/master/PrimaryServerHandler.java#L116
>
> Am I using ChannelFutureListener incorrectly?
>
> Thanks!
> --Michi
>
> --
> View this message in context: http://netty-forums-and-mailing-lists.685743.n2.nabble.com/deadlock-sending-a-large-200MB-file-from-server-to-client-tp6807268p6807268.html
> Sent from the Netty User Group mailing list archive at Nabble.com.
> _______________________________________________
> netty-users mailing list
> netty-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/netty-users
>


More information about the netty-users mailing list