aboutsummaryrefslogtreecommitdiff
path: root/doc/documentation/tutorial-examples/020.c
diff options
context:
space:
mode:
authorSchanzenbach, Martin <martin.schanzenbach@aisec.fraunhofer.de>2017-12-02 22:34:21 +0100
committerSchanzenbach, Martin <martin.schanzenbach@aisec.fraunhofer.de>2017-12-02 22:34:21 +0100
commitb16fa2d88aabb18f222b40136d6ace68ffc104c6 (patch)
tree6d46f086f018b6e6c169a8d8312b5990c33c3561 /doc/documentation/tutorial-examples/020.c
parenta9a7ac802811e76e33b54040bf31f00ea9438cea (diff)
parent862e488e08ca71db56dedd59059c5bb1a8c130a5 (diff)
Merge remote-tracking branch 'origin/master' into identity_abe
Diffstat (limited to 'doc/documentation/tutorial-examples/020.c')
-rw-r--r--doc/documentation/tutorial-examples/020.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/doc/documentation/tutorial-examples/020.c b/doc/documentation/tutorial-examples/020.c
new file mode 100644
index 0000000000..596db30693
--- /dev/null
+++ b/doc/documentation/tutorial-examples/020.c
@@ -0,0 +1,25 @@
+static void
+get_result_iterator (void *cls, struct GNUNET_TIME_Absolute expiration,
+ const struct GNUNET_HashCode *key,
+ const struct GNUNET_PeerIdentity *get_path,
+ unsigned int get_path_length,
+ const struct GNUNET_PeerIdentity *put_path,
+ unsigned int put_path_length,
+ enum GNUNET_BLOCK_Type type, size_t size,
+ const void *data)
+{
+ // Optionally:
+ GNUNET_DHT_get_stop (get_handle);
+}
+
+get_handle =
+ GNUNET_DHT_get_start (dht_handle,
+ block_type,
+ &key,
+ replication,
+ GNUNET_DHT_RO_NONE,
+ NULL,
+ 0,
+ &get_result_iterator,
+ cls)
+