-complete API implementation
authorChristian Grothoff <christian@grothoff.org>
Wed, 18 Dec 2013 10:08:58 +0000 (10:08 +0000)
committerChristian Grothoff <christian@grothoff.org>
Wed, 18 Dec 2013 10:08:58 +0000 (10:08 +0000)
src/dv/plugin_transport_dv.c

index 8e9ec9d53f3b2995b865b84138933fb0558ae0c8..db445f1aba8de30acb807200d958306a206fe985 100644 (file)
@@ -763,6 +763,21 @@ dv_get_network (void *cls,
 }
 
 
+/**
+ * Function that is called to get the keepalive factor.
+ * GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT is divided by this number to
+ * calculate the interval between keepalive packets.
+ *
+ * @param cls closure with the `struct Plugin`
+ * @return keepalive factor
+ */
+static unsigned int
+dv_plugin_query_keepalive_factor (void *cls)
+{
+  return 3;
+}
+
+
 /**
  * Entry point for the plugin.
  *
@@ -803,6 +818,7 @@ libgnunet_plugin_transport_dv_init (void *cls)
   api->check_address = &dv_plugin_check_address;
   api->address_to_string = &dv_plugin_address_to_string;
   api->string_to_address = &dv_plugin_string_to_address;
+  api->query_keepalive_factor = &dv_plugin_query_keepalive_factor;
   api->get_session = &dv_get_session;
   api->get_network = &dv_get_network;
   return api;