[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ns] FullTcp & "done"



>Well, to make things more clear, I'd like to point out that we are dealing
>with two problems here: invoking the done callback at the right time, and
>reusing FullTcp agents. These two issues are closely related, but they are not
>exactly the same.
>
>Real TCP implementations don't have a done callback, so it is not even well
>defined what we mean by that. Does it mean *both* endpoints are closed? Or
>that the local endpoint is closed and not willing to accept any more packets?
>(I'm not even considering half-closed connections yet...). If we are going to
>use done for reusing agents, it makes sense to invoke done when both endpoints
>are closed. Unfortunately, this is troublesome, since we will have to know
>that both agents are in TCPS_CLOSED before invoking the done callback (in
>fact, this is a bad approximation to any real implementation). This is not
>what we are actually trying to do now, since done is invoked whenever an agent
>considers its connection closed, but it doesn't care about the other endpoint
>(well, by the implemented TCP state machine, the other endpoint is also closed
>or closing the connection). The later definition is enough for webtraf, since
>we can attach the cleanup done callback to the client endpoint (close is
>invoked by the server endpoint, so the client will be the passive closing
>endpoint, and its done callback will be invoked iff both server and client are
>not going to send any more packets.)
>
>...

Sorry to jump into this old thread so late, the done{} should be
defined as when the local side thinks the connectino is closed.  It
should be equivalent of calling close() on a socket in Unix.

The reasoning is:
- this is what's needed for traffic models (as you say)
- one can't figure that out in a real network

Fortunately, it sounds like that's what you actually implemented.

   -John