EmbeddedRelated.com
Forums

tcp_tick()

Started by mlinder July 6, 2005
Hi all,

Testing out some code it appears that tcp_tick(&mySocket) will
not notice that a socket is closed if there is even one byte
of data that the application has not read from a tcp socket.

Is this a normal behavior of a TCP/IP stack or just zworlds?

Normally I dont think anyone would see this. I've use ZW tcp
since 7.25 and never noticed this before. Because why would
you ever listen, then wait for close without processing
any data or even checking?

Why would it be the stacks job to do this?

Matt



The behavior I asked about appears to be normal for ZW TCP/IP stack.

Looking for something else I ran across the following in a .pdf

"Please note that if there is data left to be read on the socket,
the socket will not completely close."



Sorry for the late reply. I did notice this on 7.31 and added code to
read and throw away data from the socket before trying to close it. I
haven't checked since then whether that is still necessary.

On 7/6/05, mlinder <mlinder@mlin...> wrote:
> Hi all,
>
> Testing out some code it appears that tcp_tick(&mySocket) will
> not notice that a socket is closed if there is even one byte
> of data that the application has not read from a tcp socket.
>
> Is this a normal behavior of a TCP/IP stack or just zworlds?
>
> Normally I dont think anyone would see this. I've use ZW tcp
> since 7.25 and never noticed this before. Because why would
> you ever listen, then wait for close without processing
> any data or even checking?
>
> Why would it be the stacks job to do this?
>
> Matt > ________________________________
> YAHOO! GROUPS LINKS >
>
> ________________________________
>



Joe,

How do you know there is still data there?

What type of device are you using to view this data?

--- Joe Ross <joe.ross@joe....> wrote:

> Sorry for the late reply. I did notice this on 7.31
> and added code to
> read and throw away data from the socket before
> trying to close it. I
> haven't checked since then whether that is still
> necessary.
>
> On 7/6/05, mlinder <mlinder@mlin...>
> wrote:
> > Hi all,
> >
> > Testing out some code it appears that
> tcp_tick(&mySocket) will
> > not notice that a socket is closed if there is
> even one byte
> > of data that the application has not read from a
> tcp socket.
> >
> > Is this a normal behavior of a TCP/IP stack or
> just zworlds?
> >
> > Normally I dont think anyone would see this. I've
> use ZW tcp
> > since 7.25 and never noticed this before. Because
> why would
> > you ever listen, then wait for close without
> processing
> > any data or even checking?
> >
> > Why would it be the stacks job to do this?
> >
> > Matt
> >
> >
> >
> >
> >
> > ________________________________
> > YAHOO! GROUPS LINKS
> >
> >
> >
> >
> > ________________________________
> >
>

____________________________________________________
Start your day with Yahoo! - make it your home page
http://www.yahoo.com/r/hs