[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet-scheme] branch master updated (582ac1e -> 36ad841)
From: |
gnunet |
Subject: |
[gnunet-scheme] branch master updated (582ac1e -> 36ad841) |
Date: |
Sun, 31 Jul 2022 21:09:43 +0200 |
This is an automated email from the git hooks/post-receive script.
maxime-devos pushed a change to branch master
in repository gnunet-scheme.
from 582ac1e cadet/client: Actually put the message-queue in the <channel>.
new 017d7f6 cadet/client: Add 'allow-send' field.
new 9310140 cadet/client: Stub handling of
msg:cadet:local:acknowledgement.
new 36ad841 cadet/client: Unstub verification of
msg:cadet:local:acknowledgement.
The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
gnu/gnunet/cadet/client.scm | 26 ++++++++++++++++++++++----
1 file changed, 22 insertions(+), 4 deletions(-)
diff --git a/gnu/gnunet/cadet/client.scm b/gnu/gnunet/cadet/client.scm
index d77df43..83b02fe 100644
--- a/gnu/gnunet/cadet/client.scm
+++ b/gnu/gnunet/cadet/client.scm
@@ -53,7 +53,8 @@
(only (gnu gnunet concurrency lost-and-found)
make-lost-and-found collect-lost-and-found-operation
losable-lost-and-found)
- (only (gnu gnunet mq handler) message-handlers)
+ (only (gnu gnunet mq handler)
+ message-handlers message-handler)
(only (gnu gnunet mq) close-queue! send-message!)
(only (gnu gnunet server)
maybe-send-control-message! make-error-handler
@@ -110,11 +111,21 @@
;; numbers are reset.
(mutable channel-number channel-channel-number
set-channel-channel-number!)
- (immutable message-queue channel-message-queue)) ; <message-queue>
+ (immutable message-queue channel-message-queue) ; <message-queue>
+ ;; (Natural number, possibly zero) The number of messages the
service
+ ;; currently allows the the client to send to the service.
+ ;; This is decremented after sending a message to the service
+ ;; and incremented after receiving a
+ ;; @code{/:msg:cadet:local:acknowledgement}.
+ ;;
+ ;; TODO: implement
+ ;;
+ ;; Concurrency: this may only be read/written in the main event
loop.
+ (mutable allow-send channel-allow-send set-channel-allow-send!))
(protocol (lambda (%make)
(lambda (server destination options message-queue)
((%make (losable-lost-and-found server)) server
- destination options #false message-queue)))))
+ destination options #false message-queue 0)))))
(define* (connect config #:key (connected values) (disconnected values)
(spawn spawn-fiber))
@@ -140,7 +151,14 @@
(get-operation control-channel)
(wrap-operation (collect-lost-and-found-operation lost-and-found)
(lambda (lost) (cons 'lost lost)))))
- (define handlers (message-handlers)) ; TODO
+ (define handlers
+ (message-handlers
+ (message-handler
+ (type (symbol-value message-type msg:cadet:local:acknowledgement))
+ ((interpose exp) exp)
+ ((well-formed? slice)
+ (= (slice-length slice) (sizeof /:msg:cadet:local:acknowledgement
'())))
+ ((handle! slice) TODO))))
(define error-handler
(make-error-handler connected disconnected terminal-condition
control-channel))
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [gnunet-scheme] branch master updated (582ac1e -> 36ad841),
gnunet <=