[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r24563 - in gnunet/src: include mesh
From: |
gnunet |
Subject: |
[GNUnet-SVN] r24563 - in gnunet/src: include mesh |
Date: |
Fri, 26 Oct 2012 16:05:59 +0200 |
Author: bartpolot
Date: 2012-10-26 16:05:59 +0200 (Fri, 26 Oct 2012)
New Revision: 24563
Modified:
gnunet/src/include/gnunet_mesh_service.h
gnunet/src/mesh/mesh_api.c
Log:
- add compression length to mesh api announce_regex
Modified: gnunet/src/include/gnunet_mesh_service.h
===================================================================
--- gnunet/src/include/gnunet_mesh_service.h 2012-10-26 12:58:46 UTC (rev
24562)
+++ gnunet/src/include/gnunet_mesh_service.h 2012-10-26 14:05:59 UTC (rev
24563)
@@ -227,16 +227,24 @@
* Announce to ther peer the availability of services described by the regex,
* in order to be reachable to other peers via connect_by_string.
*
- * Note that the first 8 characters are considered to be part of a prefix,
- * (for instance 'gnunet://'). If you put a variable part in there (*, +. ()),
- * all matching strings will be stored in the DHT.
+ * Note that the first GNUNET_REGEX_INITIAL_BYTES characters are considered
+ * to be part of a prefix, (for instance 'gnunet://').
+ * If you put a variable part in there (*, +. ()), all matching strings
+ * will be stored in the DHT.
*
- * @param h handle to mesh.
- * @param regex string with the regular expression describing local services.
+ * @param h Handle to mesh.
+ * @param regex String with the regular expression describing local services.
+ * @param compression_characters How many characters can be assigned to one
+ * edge of the graph. The bigger the variability
+ * of the data, the smaller this parameter should
+ * be (down to 1).
+ * For maximum compression, use strlen (regex)
+ * or 0 (special value). Use with care!
*/
void
GNUNET_MESH_announce_regex (struct GNUNET_MESH_Handle *h,
- const char *regex);
+ const char *regex,
+ unsigned int compression_characters);
/**
Modified: gnunet/src/mesh/mesh_api.c
===================================================================
--- gnunet/src/mesh/mesh_api.c 2012-10-26 12:58:46 UTC (rev 24562)
+++ gnunet/src/mesh/mesh_api.c 2012-10-26 14:05:59 UTC (rev 24563)
@@ -1666,12 +1666,19 @@
* (for instance 'gnunet://'). If you put a variable part in there (*, +. ()),
* all matching strings will be stored in the DHT.
*
- * @param h handle to mesh.
- * @param regex string with the regular expression describing local services.
+ * @param h Handle to mesh.
+ * @param regex String with the regular expression describing local services.
+ * @param compression_characters How many characters can be assigned to one
+ * edge of the graph. The bigger the variability
+ * of the data, the smaller this parameter should
+ * be (down to 1).
+ * For maximum compression, use strlen (regex)
+ * or 0 (special value). Use with care!
*/
void
GNUNET_MESH_announce_regex (struct GNUNET_MESH_Handle *h,
- const char *regex)
+ const char *regex,
+ unsigned int compression_characters)
{
struct GNUNET_MessageHeader *msg;
size_t len;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r24563 - in gnunet/src: include mesh,
gnunet <=