[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet-scheme] 02/11: nse/client: Move creation of field values to the
From: |
gnunet |
Subject: |
[gnunet-scheme] 02/11: nse/client: Move creation of field values to the record protocol. |
Date: |
Thu, 30 Jun 2022 00:49:22 +0200 |
This is an automated email from the git hooks/post-receive script.
maxime-devos pushed a commit to branch master
in repository gnunet-scheme.
commit 6b3e9e1f14467ae98bd16caa0d3be5397d180650
Author: Maxime Devos <maximedevos@telenet.be>
AuthorDate: Wed Jun 29 22:00:55 2022 +0000
nse/client: Move creation of field values to the record protocol.
This brings the NSE code closer to the DHT code, which should help
with future service code unification.
* gnu/gnunet/nse/client.scm
(connect): Move initialiation of values to ...
(<server>): ... the new protocol.
---
gnu/gnunet/nse/client.scm | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
diff --git a/gnu/gnunet/nse/client.scm b/gnu/gnunet/nse/client.scm
index 8044340..c54d664 100644
--- a/gnu/gnunet/nse/client.scm
+++ b/gnu/gnunet/nse/client.scm
@@ -88,7 +88,13 @@
(immutable request-close?/box
server-request-close?/box)
(immutable request-close-condition
- server-request-close-condition)))
+ server-request-close-condition))
+ (protocol
+ (lambda (%make)
+ (lambda ()
+ (%make (make-atomic-box #false)
+ (make-atomic-box #false)
+ (make-condition))))))
(define (estimate server)
"Return the current estimate of the number of peers on the network,
@@ -223,10 +229,12 @@ until connected again. It is possible for @var{updated}
to be called
shortly after calling @var{disconnected}.
The procedures @var{updated}, @var{connected} and @var{disconnected} are
optional."
+ (define server (%make-server))
(define estimate/box (make-atomic-box #f))
- (define request-close?/box (make-atomic-box #f))
- (define request-close-condition (make-condition))
- (reconnect estimate/box request-close?/box request-close-condition config
+ (reconnect (server-estimate/box server)
+ (server-request-close?/box server)
+ (server-request-close-condition server)
+ config
#:updated updated #:connected connected #:disconnected
disconnected
#:spawn spawn)
- (%make-server estimate/box request-close?/box request-close-condition))))
+ server)))
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [gnunet-scheme] branch master updated (1f78c1e -> fd17a8f), gnunet, 2022/06/29
- [gnunet-scheme] 02/11: nse/client: Move creation of field values to the record protocol.,
gnunet <=
- [gnunet-scheme] 03/11: tests: Extract the "notify disconnected after end-of-file, after 'connected'" test from NSE., gnunet, 2022/06/29
- [gnunet-scheme] 07/11: doc: Make explanation of 'close-not-connected-no-fallbacks' more precise., gnunet, 2022/06/29
- [gnunet-scheme] 04/11: distributed-hash-table: Add a 'disconnect-after-eof-after-connected' test., gnunet, 2022/06/29
- [gnunet-scheme] 05/11: tests/distributed-hash-table: Notice an indeterministic test failure., gnunet, 2022/06/29
- [gnunet-scheme] 01/11: dht/client: Simplify by eliminating the lost-and-found field., gnunet, 2022/06/29
- [gnunet-scheme] 10/11: tests: Extract the "reconnects" test from NSE., gnunet, 2022/06/29
- [gnunet-scheme] 11/11: distributed-hash-table: Add a 'reconnects' test., gnunet, 2022/06/29
- [gnunet-scheme] 09/11: cadet: skip failing test for now to allow other tests to run., gnunet, 2022/06/29
- [gnunet-scheme] 06/11: doc: Document 'connect-after-eof-after-connected'., gnunet, 2022/06/29
- [gnunet-scheme] 08/11: Correct typo: close-not-connected-no-fallbacks -> close-not-connected-no-callbacks., gnunet, 2022/06/29