[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet-scheme] 02/02: cadet/client: Handle acknowledgements.
From: |
gnunet |
Subject: |
[gnunet-scheme] 02/02: cadet/client: Handle acknowledgements. |
Date: |
Wed, 17 Aug 2022 17:20:09 +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 d6c0a8b7e8acf784e7b0b2de288d8f77288dacad
Author: Maxime Devos <maximedevos@telenet.be>
AuthorDate: Wed Aug 17 17:17:27 2022 +0200
cadet/client: Handle acknowledgements.
* gnu/gnunet/cadet/client.scm
(reconnect)[control*]{acknowledgement}: Increment the allow-send and
run send-channel-stuff!.
(reconnect)[control*]{send-channel-stuff!}: Remove resolved TODO about
acknowledgements.
---
gnu/gnunet/cadet/client.scm | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/gnu/gnunet/cadet/client.scm b/gnu/gnunet/cadet/client.scm
index 3fd7256..de7d8f0 100644
--- a/gnu/gnunet/cadet/client.scm
+++ b/gnu/gnunet/cadet/client.scm
@@ -214,8 +214,6 @@
;; cancel the corresponding message to be sent to the CADET service
when
;; there is still time, zero-copy networking.
;;
- ;; TODO: integration with local-acknowledgement
- ;;
;; TODO: untested
(let/ec
stop
@@ -269,7 +267,13 @@
#false))
(? (not channel)
???))
- TODO do stuff with channel))
+ ;; The service is allowing us to send another message;
+ ;; update the number of allowed messages.
+ (set-channel-allow-send!
+ channel (+ 1 (channel-allow-send channel)))
+ ;; Actually send some message, if there are any to send.
+ (send-channel-stuff! channel)
+ (continue)))
(('send-channel-stuff! message-queue channel)
;; Tell the service to send the messages over CADET.
(send-channel-stuff! channel)
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.