diff options
Diffstat (limited to 'src/transport/plugin_transport_template.c')
-rw-r--r-- | src/transport/plugin_transport_template.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/transport/plugin_transport_template.c b/src/transport/plugin_transport_template.c index feb0802d9..abcae5111 100644 --- a/src/transport/plugin_transport_template.c +++ b/src/transport/plugin_transport_template.c | |||
@@ -224,6 +224,21 @@ template_plugin_disconnect_session (void *cls, | |||
224 | 224 | ||
225 | 225 | ||
226 | /** | 226 | /** |
227 | * Function that is called to get the keepalive factor. | ||
228 | * GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT is divided by this number to | ||
229 | * calculate the interval between keepalive packets. | ||
230 | * | ||
231 | * @param cls closure with the `struct Plugin` | ||
232 | * @return keepalive factor | ||
233 | */ | ||
234 | static unsigned int | ||
235 | template_plugin_query_keepalive_factor (void *cls) | ||
236 | { | ||
237 | return 3; | ||
238 | } | ||
239 | |||
240 | |||
241 | /** | ||
227 | * Function obtain the network type for a session | 242 | * Function obtain the network type for a session |
228 | * | 243 | * |
229 | * @param cls closure ('struct Plugin*') | 244 | * @param cls closure ('struct Plugin*') |
@@ -393,6 +408,7 @@ libgnunet_plugin_transport_template_init (void *cls) | |||
393 | api->send = &template_plugin_send; | 408 | api->send = &template_plugin_send; |
394 | api->disconnect_peer = &template_plugin_disconnect_peer; | 409 | api->disconnect_peer = &template_plugin_disconnect_peer; |
395 | api->disconnect_session = &template_plugin_disconnect_session; | 410 | api->disconnect_session = &template_plugin_disconnect_session; |
411 | api->query_keepalive_factor = &template_plugin_query_keepalive_factor; | ||
396 | api->address_pretty_printer = &template_plugin_address_pretty_printer; | 412 | api->address_pretty_printer = &template_plugin_address_pretty_printer; |
397 | api->check_address = &template_plugin_address_suggested; | 413 | api->check_address = &template_plugin_address_suggested; |
398 | api->address_to_string = &template_plugin_address_to_string; | 414 | api->address_to_string = &template_plugin_address_to_string; |