gnunet-svn
[Top][All Lists]
Advanced

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

[gnunet-scheme] 31/42: doc/service-communication: Document spawn-server-


From: gnunet
Subject: [gnunet-scheme] 31/42: doc/service-communication: Document spawn-server-loop.
Date: Sat, 10 Sep 2022 19:08:24 +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 acb81b2b0eb08754add09163ce2fa29052fb8eef
Author: Maxime Devos <maximedevos@telenet.be>
AuthorDate: Fri Sep 9 21:58:03 2022 +0200

    doc/service-communication: Document spawn-server-loop.
    
    * doc/service-communication
    (Writing service communication code)[spawn-server-loop]: New
    explanation.
---
 doc/service-communication.tm | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/doc/service-communication.tm b/doc/service-communication.tm
index 1c083b5..f23848b 100644
--- a/doc/service-communication.tm
+++ b/doc/service-communication.tm
@@ -539,6 +539,32 @@
     </example>
   </explain>
 
+  <\explain>
+    <scm|(spawn-server-loop server #:make-loop #:initial-extra-loop-arguments
+    <text-dots>)>
+  <|explain>
+    Make the loop for <var|server> and enter it in the background.
+
+    All the keyword arguments are passed to <scm|#:make-loop>. Additionally,
+    <scm|#:terminal-condition>, <scm|#:control-channel> and
+    <scm|#:lost-and-found> are set to the terminal condition, control channel
+    and lost-and-found of <var|server> respectively. Consult the
+    documentation of <scm|#:make-loop> to determine what arguments have
+    default values and what arguments need to be set explicitly.
+
+    <scm|#:spawn> must be set, even if <scm|#:make-loop> does not require it.
+
+    To make an instance of a proper subtype of <scm|\<less\>loop\<gtr\>>, set
+    <scm|#:make-loop> to the constructor of the subtype. By default, the
+    constructor <scm|make-loop> itelf is used.
+
+    To pass additional state arguments, set
+    <var|initial-extra-loop-arguments> to a list of additional values to
+    pass. By default, it is an empty list. When entering the loop, the loop
+    itself and the <var|initial-extra-loop-arguments> are passed to the
+    <scm|#:control-message-handler>, in that order, as state arguments.
+  </explain>
+
   <\explain>
     <scm|(maybe-send-control-message! <var|server> . <var|message>)>
   <|explain>

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