public inbox for nncp-devel@lists.stargrave.org
Atom feed
From: John Goerzen <jgoerzen@complete•org>
To: nncp-devel@lists.cypherpunks.ru
Subject: New -autotoss option
Date: Thu, 07 Jan 2021 15:32:45 -0600	[thread overview]
Message-ID: <87k0so77r6.fsf@complete.org> (raw)
In-Reply-To: <87lfd4787f.fsf@complete.org>

Hi Sergey,

Thanks again for the new version.  I've been experimenting with 
-autotoss.

At first it didn't seem to do anything in nncp-caller, but after 
killing the remote nncp-daemon, it went on to do the toss.

I think that waiting for the remote end to hang up might delay 
things; I have a very large onlinedeadline and timeout.  I think 
pseudo code like this might do the trick:

loop forever
   needstoss = false
   if remote.has_packets_for_us()
       needstoss = true
       process_packets
   when ! remote.has_packets_for_us()
       if needstoss
           toss
           needstoss = false

In other words, every time we transition in state from "remote 
host has packets for us" to "remote host no longer has packets for 
us", we toss.  This could also be very nice even for 10-second 
onlinedeadlines, because it might allow a toss and response to be 
sent even within that window regularly.

What do you think?

- John

  reply	other threads:[~2021-01-07 21:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-07 15:31 [EN] NNCP 5.5.0 release announcement Sergey Matveev
2021-01-07 21:23 ` John Goerzen
2021-01-07 21:32   ` John Goerzen [this message]
2021-01-08 10:00     ` New -autotoss option Sergey Matveev
2021-01-08 10:01       ` Sergey Matveev
2021-01-08 13:38         ` John Goerzen
2021-01-08  9:45   ` [EN] NNCP 5.5.0 release announcement Sergey Matveev
2021-01-08 13:43     ` John Goerzen
2021-01-08 13:53       ` Sergey Matveev