Chunked READ and multi message

Norman Maurer norman at apache.org
Thu Jan 20 02:15:24 EST 2011


Hi there,

comments inside..

2011/1/19 scottesker <scott_esker at yahoo.com>:
>
> Ok.  I have seen numerous questions about this, and really no answers.  I am
> analyzing netty for a project, and have written several test cases and
> believe it is going to do what I need.  The two things that I have questions
> for, the simple examples and what I have been able to search for have now
> answered...
>
> 1.  Chunked file read.  Yes, I have looked, read the code etc of the Chunked
> Classes that exist in netty right now.  The problem is, and I think others
> have asked is -- We are not doing HTTP protocol.  We are using TCP for point
> to point communications.  All I keep seeing is to use the Chunk aggregator
> for HTTP.  So to be perfectly clear to those around that have asked the
> question, there is no support currently (built in) to  handle reading of
> chunks, only writing (non http)?  I already know the answer I guess from
> looking at the checked out code, so I will assume that I need to write an
> aggregator that is non http myself..?  Is that the architectural approach
> that is recommended?

You can just insert the ChunkedWrteHandler for this. Just add it in
the pipeline and write your data with one of the ChunkedInput
implementations:

http://docs.jboss.org/netty/3.2/api/org/jboss/netty/handler/stream/package-summary.html

Works perfect here..



>
> 2.  Multi message decoding.  So, we have many types of messages that are
> going to be transmitted via TCP.  Is the architecturally suggested method to
> use multiple channel handlers, or?
>
> I know these questions can be implemented in numerous ways, I am hoping that
> someone with more time with netty, can suggest the preferred method of
> implementing these two requirements.  I certainly don't mind writing the
> code, just need a direction...

I think you are looking for a multiplexer. See documentation in the javadocs:

http://docs.jboss.org/netty/3.2/api/org/jboss/netty/handler/codec/replay/ReplayingDecoder.html


>
> Thanks
> --
> View this message in context: http://netty-forums-and-mailing-lists.685743.n2.nabble.com/Chunked-READ-and-multi-message-tp5938178p5938178.html
> Sent from the Netty User Group mailing list archive at Nabble.com.

Bye,
Norman



More information about the netty-users mailing list