gnunet-svn
[Top][All Lists]
Advanced

[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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]