Ethereal-users: RE: [Ethereal-users] TCP ACK packets with data in them...
> -----Original Message-----
> From: Guy Harris
>
> On Thu, Feb 27, 2003 at 05:34:31PM -0800, Bob Eby wrote:
> > I've been using ethereal for a while now to diagnose
> network problems
> > and test software. Recently I've been working on a Java application
> > that sends and receives TCP data using the java.nio package. In a
> > recent sniffer trace I see examples of TCP ACK packets that contain
> > large amounts of data that resembles what I'm trying to
> send. At the
> > same time I *don't* see PUSH/ACK packets containing this same data.
>
> So is the problem just that the PUSH bit isn't being set on some data
> segments?
>
> If so, that might just be a question of what the OS on which you're
> running chooses to do in its TCP stack.
>
> If it has no API to allow a sending application to force a push, it's
> not a problem in java.nio, as there's nothing java.nio can do about it
> (except *maybe* write in a fashion that triggers pushing,
> *if* the OS's
> stack does a push if it infers from the writes being done that a push
> should be done - I've no idea whether any OSes do that).
>
> If it does have such an API, then it's a problem with java.nio only to
> the extent that it doesn't offer, say, a "push" method - but perhaps
> they didn't think exposing the notion of pushes was a good idea.
>From Stevens: TCP Illustrated Vol. 1 Section 20.5 PUSH Flag
... a notification from the sender to the receiver for the receiver to pass
all the data that it has to the receiving process. ...
... most APIs do not provide a way for the application to tell its TCP to
set the PUSH flag. ...
... Most Berkeley-derived implementations automatically set the PUSH flag if
the data in the segment empties the send buffer. ...
Regards,
Andrew Hood
A distributed system is one in which the failure of a computer you
didn't even know existed can render your own computer unusable. --
Leslie Lamport, as quoted in CACM, June 1992
<<application/ms-tnef>>