does TAKETHIS wait for a response?

Russ Allbery rra at stanford.edu
Wed Sep 29 18:51:42 UTC 2004


Anne Wilson <anne at unidata.ucar.edu> writes:

> I'm browsing the code and trying to determine if innfeed waits for a
> response to TAKETHIS or not.  The RFC says:

>     TAKETHIS is used to send articles to a server when in streaming mode.
>     The entire article (header and body, in that sequence) is sent
>     immediately after the peer sends the TAKETHIS command.  The peer does
>     not have to wait for a response from the server before sending the
>     next command and the associated article.

> Seems like innfeed would have to wait for a response in order to switch
> back and forth between CHECK and TAKETHIS, unless it is doing something
> more clever.

No, it can go ahead and send CHECKs right after TAKETHIS; there's no need
for it to wait.  I'm not sure if it *does* wait or not; I think it may
depend on the circumstances and how much it has queued up to go.

> From what I see (specifically looking at "prepareRead") it looks like it
> only reads a response if there's one on the socket.  Is that correct?

That sounds right.

> If it doesn't wait for a response, then does it assume articles are
> being accepted for the purpose of determining what mode to be in?

When the responses come in, they're analyzed and the current acceptance
ratio is updated.  When the articles are queued to be sent, the current
acceptance ratio is used to determine what mode to be in.  So in practice,
the behavior will lag a little bit behind the current acceptance ratio.

-- 
Russ Allbery (rra at stanford.edu)             <http://www.eyrie.org/~eagle/>

    Please send questions to the list rather than mailing me directly.
     <http://www.eyrie.org/~eagle/faqs/questions.html> explains why.


More information about the inn-workers mailing list