gnunet-svn
[Top][All Lists]
Advanced

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

[gnunet-nim] branch master updated (3a1416d -> 8c4e5fa)


From: gnunet
Subject: [gnunet-nim] branch master updated (3a1416d -> 8c4e5fa)
Date: Fri, 10 Jul 2020 18:14:44 +0200

This is an automated email from the git hooks/post-receive script.

lurchi pushed a change to branch master
in repository gnunet-nim.

    from 3a1416d  remove when blocks
     new 17b7bf0  GNUNET_SCHEDULER_add does not work anymore before first call 
to GNUNET_SCHEDULER_do_work
     new 8c4e5fa  update GNUnet's protocol numbers again

The 2 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:
 src/gnunet_nim/cadet.nim            | 19 ++-------
 src/gnunet_nim/gnunet_protocols.nim | 79 ++++++++++++++++---------------------
 2 files changed, 37 insertions(+), 61 deletions(-)

diff --git a/src/gnunet_nim/cadet.nim b/src/gnunet_nim/cadet.nim
index b079f52..64991d7 100644
--- a/src/gnunet_nim/cadet.nim
+++ b/src/gnunet_nim/cadet.nim
@@ -140,18 +140,7 @@ proc disconnect(cadetHandle: ptr CadetHandle) =
 proc shutdownCb(cls: pointer) {.cdecl.} =
   disconnect(cast[ptr CadetHandle](cls))
 
-proc cadetConnectCb(cls: pointer) {.cdecl.} =
-  let app = cast[ptr GnunetApplication](cls)
-  var future: FutureBase
-  if app.connectFutures.take("cadet", future):
-    var cadetHandle: ref CadetHandle
-    new(cadetHandle, proc(handle: ref CadetHandle) = disconnect(addr handle[]))
-    cadetHandle.handle = GNUNET_CADET_connect(app.configHandle)
-    cadetHandle.shutdownTask = GNUNET_SCHEDULER_add_shutdown(shutdownCb,
-                                                             addr 
cadetHandle[])
-    Future[ref CadetHandle](future).complete(cadetHandle)
-
-proc initCadet*(app: ref GnunetApplication): Future[ref CadetHandle] =
-  result = newFuture[ref CadetHandle]("connectCadet")
-  app.connectFutures.add("cadet", result)
-  discard GNUNET_SCHEDULER_add_now(cadetConnectCb, addr app[])
+proc initCadet*(app: ref GnunetApplication): ref CadetHandle =
+  new(result, proc(handle: ref CadetHandle) = disconnect(addr handle[]))
+  result.handle = GNUNET_CADET_connect(app.configHandle)
+  result.shutdownTask = GNUNET_SCHEDULER_add_shutdown(shutdownCb, addr 
result[])
diff --git a/src/gnunet_nim/gnunet_protocols.nim 
b/src/gnunet_nim/gnunet_protocols.nim
index 274c92c..c0a0e81 100644
--- a/src/gnunet_nim/gnunet_protocols.nim
+++ b/src/gnunet_nim/gnunet_protocols.nim
@@ -38,8 +38,8 @@
 ## ****************************************************************************
 
 ## 
******************************************************************************
-##  UTIL message types
-## ****************************************************************************
+##  Deprecated
+##  
****************************************************************************
 ## *
 ##  Test if service is online.
 ##
@@ -47,21 +47,24 @@
 ##
 
 const
-  GNUNET_MESSAGE_TYPE_TEST* = 1
+  GNUNET_MESSAGE_TYPE_TEST* = 0
 
+## 
******************************************************************************
+##  AGPL source code download
+##  
****************************************************************************
 ## *
-##  Dummy messages for testing / benchmarking.
+##  Message to request source code link.
 ##
 
 const
-  GNUNET_MESSAGE_TYPE_DUMMY* = 2
+  GNUNET_MESSAGE_TYPE_REQUEST_AGPL* = 1
 
 ## *
-##  Another dummy messages for testing / benchmarking.
+##  Source code link.
 ##
 
 const
-  GNUNET_MESSAGE_TYPE_DUMMY2* = 3
+  GNUNET_MESSAGE_TYPE_RESPONSE_AGPL* = 2
 
 ## 
******************************************************************************
 ##  RESOLVER message types
@@ -81,21 +84,21 @@ const
   GNUNET_MESSAGE_TYPE_RESOLVER_RESPONSE* = 5
 
 ## 
******************************************************************************
-##  AGPL source code download
-##  
****************************************************************************
+##  UTIL message types
+## ****************************************************************************
 ## *
-##  Message to request source code link.
+##  Dummy messages for testing / benchmarking.
 ##
 
 const
-  GNUNET_MESSAGE_TYPE_REQUEST_AGPL* = 6
+  GNUNET_MESSAGE_TYPE_DUMMY* = 6
 
 ## *
-##  Source code link.
+##  Another dummy messages for testing / benchmarking.
 ##
 
 const
-  GNUNET_MESSAGE_TYPE_RESPONSE_AGPL* = 7
+  GNUNET_MESSAGE_TYPE_DUMMY2* = 7
 
 ## 
******************************************************************************
 ##  ARM message types
@@ -2125,37 +2128,8 @@ const
 const
   GNUNET_MESSAGE_TYPE_CONSENSUS_P2P_ELEMENTS_REPORT* = 545
 
-##
-##  Initialization message for consensus p2p communication.
-##
-
-const
-  GNUNET_MESSAGE_TYPE_CONSENSUS_P2P_HELLO* = 546
-
-## *
-##  Report that the peer is synced with the partner after successfuly decoding
-##  the invertible bloom filter.
-##
-
-const
-  GNUNET_MESSAGE_TYPE_CONSENSUS_P2P_SYNCED* = 547
-
-## *
-##  Interaction os over, got synched and reported all elements
-##
-
-const
-  GNUNET_MESSAGE_TYPE_CONSENSUS_P2P_FIN* = 548
-
-## *
-##  Abort a round, don't send requested elements anymore
-##
-
-const
-  GNUNET_MESSAGE_TYPE_CONSENSUS_P2P_ABORT* = 548
-
 ## *
-##  Abort a round, don't send requested elements anymore
+##  Provide context for a consensus round.
 ##
 
 const
@@ -3496,9 +3470,8 @@ const
 ##  1000-1009 Connection-level Messages
 ##  1010-1019 Channel-level Messages
 ##  1020-1029 Local Client-Service
-##  1030-1039 Local Service Monitoring
-##  1040-1049 Application Data
-##  1050-1059 Reserved
+##  1030-1049 Local Service Monitoring
+##  1050-1059 Application Data
 ##
 ## *******************************  Connection  *******************************
 ## *
@@ -3757,6 +3730,13 @@ const
 const
   GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_TUNNELS_END* = 1041
 
+## *
+##  Request to drop a message of type X to peer y.
+##
+
+const
+  GNUNET_MESSAGE_TYPE_CADET_DROP_CADET_MESSAGE* = 1042
+
 ## *******************************  Application  ******************************
 ## *
 ##  Traffic (net-cat style) used by the Command Line Interface.
@@ -4048,6 +4028,13 @@ const
 const
   GNUNET_MESSAGE_TYPE_TRANSPORT_FLOW_CONTROL* = 1221
 
+## *
+##  @brief inform transport that a queue was updated
+##
+
+const
+  GNUNET_MESSAGE_TYPE_TRANSPORT_QUEUE_UPDATE* = 1222
+
 ## *
 ##  Message sent to indicate to the transport that a monitor
 ##  wants to observe certain events.

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