gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnunet-scheme] branch master updated (c3980f3 -> 0021c41)


From: gnunet
Subject: [gnunet-scheme] branch master updated (c3980f3 -> 0021c41)
Date: Thu, 28 Jul 2022 16:02:01 +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 c3980f3  cadet/client:  Use 'server' module.
     new ab7ba75  examples/web: Simplify and reduce the scope of the CADET form.
     new a53652f  examples/web: Actually conncet to the CADET server.
     new 0021c41  protocols: Add entry for gnunet-cadet-style CADET traffic.

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:
 examples/web.scm                    | 20 ++++++++++++--------
 gnu/gnunet/message/protocols.scmgen |  9 ++++++++-
 2 files changed, 20 insertions(+), 9 deletions(-)

diff --git a/examples/web.scm b/examples/web.scm
index 1bec531..5c7319b 100644
--- a/examples/web.scm
+++ b/examples/web.scm
@@ -34,6 +34,8 @@
              #:prefix #{nse:}#)
             ((gnu gnunet dht client)
              #:prefix #{dht:}#)
+            ((gnu gnunet cadet client)
+             #:prefix #{cadet:}#)
             (web response)
             (web server)
             (web uri)
@@ -98,13 +100,16 @@ for success is used."
 
 (define cadet-start-chat-form
   `(form
-    (@ (action "/start-cadet-chat") (method "post"))
+    (@ (action "/cadet-chat") (method "post"))
     (ul (li (label (@ (for "cadet-start-peer"))
                   "Identity of remote peer to connect to")
            (input (@ (type "text") (id "cadet-start-peer") (name "peer"))))
        (li (label (@ (for "cadet-port-name"))
                   "Name of the port to connect to (as a string)")
-           (input (@ (type "text") (id "cadet-port-name") (name "port")))))
+           (input (@ (type "text") (id "cadet-port-name") (name "port"))))
+       (li (label (@ (for "cadet-message"))
+                  "Message to send (text)")
+           (input (@ (type "text" (id "cadet-message") (name "message"))))))
     (input (@ (type "submit") (value "Connect!")))))
 
 (define (cadet-chat-forms)
@@ -238,12 +243,11 @@ merely a race?")))
            (estimate->html current-estimate)
            '(p "No etimate yet")))))
     ("/cadet-chat"
-     (respond/html `(div (p "You can only connect to a chat here, not start 
new ones")
+     (respond/html `(div (p "You can only send a message to an already 
existing chat here,
+not start new chats or view conversation.")
                         (p "Run gnunet-cadet --open-port=PORT to run a new 
chat!")
-                        (p "Connect to a chat!")
-                        ,cadet-start-chat-form
-                        (p "participate in a chat!")
-                        ,@(cadet-chat-forms))))
+                        (p "Send a message to a chat!")
+                        ,cadet-start-chat-form)))
     ("/search-dht" ; TODO check method and Content-Type, validation ...
      (if (pk 'b body)
         (process-search-dht dht-server (urlencoded->alist body))
@@ -259,7 +263,7 @@ merely a race?")))
 (define (start config)
   (define nse-server (nse:connect config))
   (define dht-server (dht:connect config))
-  (define cadet-server (dht:connect config))
+  (define cadet-server (cadet:connect config))
   (define impl (lookup-server-impl 'fiberized))
   (define server (open-server impl `(#:port 8089)))
   (define (url-handler* request body)
diff --git a/gnu/gnunet/message/protocols.scmgen 
b/gnu/gnunet/message/protocols.scmgen
index d04cda8..ac14b11 100644
--- a/gnu/gnunet/message/protocols.scmgen
+++ b/gnu/gnunet/message/protocols.scmgen
@@ -1,6 +1,6 @@
 ;; -*- scheme -*- Constants for network protocols
 ;; This file is part of scheme-GNUnet.
-;; Copyright (C) 2001--2021 GNUnet e.V.
+;; Copyright (C) 2001--2021, 2022 GNUnet e.V.
 ;; SPDX-License-Identifier: AGPL-3.0-or-later
 ;;
 ;; scheme-GNUnet is free software: you can redistribute it and/or modify it
@@ -124,6 +124,13 @@
     ,@(include/sexp "enum-multicast.scmfrag")
     ,@(msg:filler 763 999)
     ,@(include/sexp "enum-cadet.scmfrag")
+    ,@(msg:filler 1026 1058)
+    (value
+     (symbol msg:cadet:command-line-traffic)
+     (index 1059)
+     (documentation "A message sent by the @code{gnunet-cadet} CLI.
+The contents is free-form, all that is required is sending it."))
+
     ;; TODO:
     ;; SECRETSHARING,
     ;; PEERSTORE,

-- 
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]