What is the protocol, http?

If so, are you dealing with chunked encoding? If not, there is a class in
codec.http for that that you can just put in the pipeline, and channelRead
will be deferred until all the data is there. Otherwise, you are just
reading the first chunk and thinking you're done (you can check the http
headers you're getting to see if that's the case).

-Tim


On Mon, Apr 10, 2017 at 10:54 PM <[email protected]> wrote:

> Thank you guys for caring.  This is my other gmail.
>
> I think Tim is right.  Though I reinvented the wheel and sent smaller
> packets, it only worked some of the time.
>
> I'm using Adobe Air to send data as a client, and Netty Java as my server.
>
> I send a string of information via Adobe Air, and Netty doesn't read the
> whole string.
>
> The string is like 544 characters long,


and what gets cut off is like 50-65 characters.
>
> My adobe air looks like:
> socket.writeObject(data)
> socket.flush();
>
> My Netty looks like:
> Public void channelRead(ChannelHandlerContext ctz, Object msg){
> ByteBuf in = (ByteBuf) msg;
> Try{
> String s1;
> s1=in.toString(io.netty.util.CharsetUtil.US_ASCII);
> in.release
> System.out.println(s1); // Doesn't always print out all the characters
> sent via Adobe Air, seems like only errors out when
> // hundreds of characters are sent, as I don't get errors on small
> packets.  I get the first couple hundred and it cuts off
> // the last 1-65 ish most of the time.
>
> //Thank you for helping me.  I should have an alpha video game out in two
> months or so if I can figure thisnone out
>
> }
> finally
> {}
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Netty discussions" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/netty/pekavYE2zbE/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/netty/80886336-2182-4aa1-8c4b-9b9609fde0d2%40googlegroups.com
> .
> For more options, visit https://groups.google.com/d/optout.
>
-- 
http://timboudreau.com

-- 
You received this message because you are subscribed to the Google Groups 
"Netty discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/netty/CA%2BqecRPd395VcS_NxBWp3uCjT50ytx8HYwn62MNGuh1dX%2BrgdA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to