- verboser log, faster start
[oweals/gnunet.git] / src / transport / transport_api.c
index 966a71ee331ca641f3871048e51554723ffbb87b..7f0bc92d2597c3f74477351ee29380a9b1e85061 100644 (file)
@@ -1207,6 +1207,32 @@ send_metric (void *cls, size_t size, void *buf)
   return ssize;
 }
 
+
+/**
+ * Set transport metrics for a peer and a direction
+ *
+ * @param handle transport handle
+ * @param peer the peer to set the metric for
+ * @param direction can be: TM_SEND, TM_RECV, TM_BOTH
+ * @param ats the metric as ATS information
+ * @param ats_count the number of metrics
+ *
+ * Supported ATS values:
+ * GNUNET_ATS_QUALITY_NET_DELAY  (value in ms)
+ * GNUNET_ATS_QUALITY_NET_DISTANCE (value in #hops)
+ *
+ * Example
+ * To enforce a delay of 10 ms for peer p1 in sending direction use:
+ *
+ * struct GNUNET_ATS_Information ats;
+ * ats.type = ntohl (GNUNET_ATS_QUALITY_NET_DELAY);
+ * ats.value = ntohl (10);
+ * GNUNET_TRANSPORT_set_traffic_metric (th, p1, TM_SEND, &ats, 1);
+ *
+ * Note:
+ * Delay restrictions in receiving direction will be enforced with
+ * 1 message delay.
+ */
 void
 GNUNET_TRANSPORT_set_traffic_metric (struct GNUNET_TRANSPORT_Handle *handle,
                                                                                                                                                const struct GNUNET_PeerIdentity *peer,