Agreed.  Some places to start, since you haven't replied with more detail:

 - If TCP, there shouldn't be anything that's "too big" since the network 
layer at the OS level application will take care of splitting data into 
packets.  If you're doing TCP, then something else is wrong.  Here's one 
that can happen that's not obvious to people new to asynchronous I/O:

    - If you are flushing some bytes to the socket, are you waiting until 
you get an event (in a ChannelFutureListener) before sending more, or are 
you just slamming them out there in a for-loop?  If the latter, it's 
entirely possible that you are sending the data, but it's being flushed to 
the stream out-of-order, so it looks like garbage, and something on the 
other end is discarding it silently.  Introducing a 0.5 second delay 
*would* look like it fixed the problem.

 - If it's UDP, maximum packet size depends on the network between you and 
the other end, and packets that are too large go into a black hole.  But if 
introducing a delay solves the problem, then this is not your problem.

 - If it's SCTP, messages larger than a threshold side get split up and 
must be reassembled on the other end.

At any rate, I think your problem is not packet *size* per se, since 
introducing a delay fixes the problem.  And if it's a TCP based protocol, 
you're likely misusing the word "packet" - when you flush a buffer, that 
might go out as one packet, or more, depending on the size of the data (it 
also might theoretically get split up into more or combined into fewer 
packets by any router between you and the endpoint).  A buffer is not a 
packet.

tcpflow is a handy unix utility if you want to just copy all outbound data 
from your computer, the way it looks on the wire, to files on disk and then 
examine them - that might help diagnose things.  Or wireshark if you prefer 
GUI tools.  Take a look at what's really going over the wire.  Your problem 
is almost surely not data size.

-Tim

-- 
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/889ca86c-8533-483d-aafd-06d264551603%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to