diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-12-18 10:08:58 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-12-18 10:08:58 +0000 |
commit | ef70fb51271773df97714f739fe7184d4d3a63b8 (patch) | |
tree | 181c36d2190835cb10bcb42639dc288f0bb9e0a5 /src/dv/plugin_transport_dv.c | |
parent | d594bbd28bc332595949950f371d0732a8ed02e2 (diff) | |
download | gnunet-ef70fb51271773df97714f739fe7184d4d3a63b8.tar.gz gnunet-ef70fb51271773df97714f739fe7184d4d3a63b8.zip |
-complete API implementation
Diffstat (limited to 'src/dv/plugin_transport_dv.c')
-rw-r--r-- | src/dv/plugin_transport_dv.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/dv/plugin_transport_dv.c b/src/dv/plugin_transport_dv.c index 8e9ec9d53..db445f1ab 100644 --- a/src/dv/plugin_transport_dv.c +++ b/src/dv/plugin_transport_dv.c | |||
@@ -764,6 +764,21 @@ dv_get_network (void *cls, | |||
764 | 764 | ||
765 | 765 | ||
766 | /** | 766 | /** |
767 | * Function that is called to get the keepalive factor. | ||
768 | * GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT is divided by this number to | ||
769 | * calculate the interval between keepalive packets. | ||
770 | * | ||
771 | * @param cls closure with the `struct Plugin` | ||
772 | * @return keepalive factor | ||
773 | */ | ||
774 | static unsigned int | ||
775 | dv_plugin_query_keepalive_factor (void *cls) | ||
776 | { | ||
777 | return 3; | ||
778 | } | ||
779 | |||
780 | |||
781 | /** | ||
767 | * Entry point for the plugin. | 782 | * Entry point for the plugin. |
768 | * | 783 | * |
769 | * @param cls closure with the plugin environment | 784 | * @param cls closure with the plugin environment |
@@ -803,6 +818,7 @@ libgnunet_plugin_transport_dv_init (void *cls) | |||
803 | api->check_address = &dv_plugin_check_address; | 818 | api->check_address = &dv_plugin_check_address; |
804 | api->address_to_string = &dv_plugin_address_to_string; | 819 | api->address_to_string = &dv_plugin_address_to_string; |
805 | api->string_to_address = &dv_plugin_string_to_address; | 820 | api->string_to_address = &dv_plugin_string_to_address; |
821 | api->query_keepalive_factor = &dv_plugin_query_keepalive_factor; | ||
806 | api->get_session = &dv_get_session; | 822 | api->get_session = &dv_get_session; |
807 | api->get_network = &dv_get_network; | 823 | api->get_network = &dv_get_network; |
808 | return api; | 824 | return api; |