How to Pause, Stop , Resume a ChunkedFile Transfer
"이희승 (Trustin Lee)"
trustin at gmail.com
Tue Oct 25 20:31:06 EDT 2011
If you want to pause the transfer, you'll have to implement your own
variant of ChunkedFile, which returns null on nextChunk() to pause the
transfer, and then call ChunkedWriteHandler.resumeTransfer() later when
your ChunkedInput implementation's nextChunk() is ready to return non-null.
HTH
metalstorm wrote:
> So i'm using a ChunkedFile and ChunkedWriteHandler on my client, once ive
> started the transfer:
> ch.write(new ChunkedFile(somefile));
>
> How do I then pause the transfer (doesn't write the next chunk) and
> subsequently resume it later when needed or stop the transfer without
just
> pulling the plug (closing the channel).
>
> Would it involve some form of thread waiting and notifying?
>
>
> Could i make someFile null at somepoint, as if it was like a stream/so it
> can't get the next chunk then call .ResumeTransfer() after instancing
> someFile again?
>
> thanks.
>
> --
> View this message in context:
http://netty-forums-and-mailing-lists.685743.n2.nabble.com/How-to-Pause-Stop-Resume-a-ChunkedFile-Transfer-tp6921402p6921402.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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/netty-users/attachments/20111025/89bfc0de/attachment.html
More information about the netty-users
mailing list