diff options
| author | eunhhu <[email protected]> | 2026-09-29 15:02:46 +0100 |
|---|---|---|
| committer | eunhhu <[email protected]> | 2026-09-29 15:02:46 +0100 |
| commit | a48c38d2a80efd146ba0f81cb46bac00c22297b6 (patch) | |
| tree | 348cae210dde44dcbe0f4c2d8eb9bfd2b8c29c44 /link/link-protocol.c | |
| parent | 0f074f2b1e26e0cdc4e17b785eda2e06ef13e5a8 (diff) | |
| download | pure-a48c38d2a80efd146ba0f81cb46bac00c22297b6.tar.gz pure-a48c38d2a80efd146ba0f81cb46bac00c22297b6.zip | |
Look for a link's receiver again when its probes go unanswered
A link resolved its receiver's name once, at its start: a receiver whose
store moved to another machine (another address under the same name)
was never found, and a sender whose own network changed kept a socket
that no longer went anywhere. Now, when three probes in a row go
unanswered, and at each probe after (a second apart at most), the link
looks the name up again and sends from a new socket connected there.
It looks before the probe goes, so the probe's answer comes to the new
socket (looking after it lost every answer, one socket after another).
A sender at rest does not look: only probes unanswered count.
make check moves a receiver (H3 of docs/design/011-pure-transport.md):
in namespaces of its own, the sender links to pure://receiver.test at
127.0.0.2; the receiver is killed, its store, key and memo copied, the
old address made unreachable, the name pointed at 127.0.0.3 and the
copy started there. Every order is applied once, and the moved receiver
makes no X25519.
Diffstat (limited to 'link/link-protocol.c')
| -rw-r--r-- | link/link-protocol.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/link/link-protocol.c b/link/link-protocol.c index 03c3abc..fe62b5f 100644 --- a/link/link-protocol.c +++ b/link/link-protocol.c @@ -1063,6 +1063,8 @@ bool pure_link_sender_shared(PureLinkSender *l, const unsigned char peer[PURE_SE uint64_t pure_link_sender_queued(const PureLinkSender *l) { return l->queued; } +unsigned pure_link_sender_probes(const PureLinkSender *l) { return l->pto_count; } + void pure_link_sender_epochs(PureLinkSender *l, uint64_t every_ns, uint64_t bytes) { l->epoch_every = every_ns; l->epoch_most = bytes; |
