aboutsummaryrefslogtreecommitdiff
path: root/src/transport/plugin_transport_template.c
diff options
context:
space:
mode:
authorLRN <lrn1986@gmail.com>2013-12-15 01:56:00 +0000
committerLRN <lrn1986@gmail.com>2013-12-15 01:56:00 +0000
commit4e67f0c94b70b5c84502080485fee34d546a76cf (patch)
tree98e9aa18e390910831e8212c2bccc3641b02f23e /src/transport/plugin_transport_template.c
parent5d8f6a7b2711cbabb7bd2d0104da03e2f67b4fd8 (diff)
downloadgnunet-4e67f0c94b70b5c84502080485fee34d546a76cf.tar.gz
gnunet-4e67f0c94b70b5c84502080485fee34d546a76cf.zip
Non-uniform keepalive timeout for different plugins
Diffstat (limited to 'src/transport/plugin_transport_template.c')
-rw-r--r--src/transport/plugin_transport_template.c16
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 */
234static unsigned int
235template_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;