diff options
author | LRN <lrn1986@gmail.com> | 2013-12-15 01:56:00 +0000 |
---|---|---|
committer | LRN <lrn1986@gmail.com> | 2013-12-15 01:56:00 +0000 |
commit | 4e67f0c94b70b5c84502080485fee34d546a76cf (patch) | |
tree | 98e9aa18e390910831e8212c2bccc3641b02f23e /src/transport/plugin_transport_unix.c | |
parent | 5d8f6a7b2711cbabb7bd2d0104da03e2f67b4fd8 (diff) | |
download | gnunet-4e67f0c94b70b5c84502080485fee34d546a76cf.tar.gz gnunet-4e67f0c94b70b5c84502080485fee34d546a76cf.zip |
Non-uniform keepalive timeout for different plugins
Diffstat (limited to 'src/transport/plugin_transport_unix.c')
-rw-r--r-- | src/transport/plugin_transport_unix.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/transport/plugin_transport_unix.c b/src/transport/plugin_transport_unix.c index 3d6ac4d23..906cf9997 100644 --- a/src/transport/plugin_transport_unix.c +++ b/src/transport/plugin_transport_unix.c | |||
@@ -600,6 +600,21 @@ unix_session_disconnect (void *cls, | |||
600 | 600 | ||
601 | 601 | ||
602 | /** | 602 | /** |
603 | * Function that is called to get the keepalive factor. | ||
604 | * GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT is divided by this number to | ||
605 | * calculate the interval between keepalive packets. | ||
606 | * | ||
607 | * @param cls closure with the `struct Plugin` | ||
608 | * @return keepalive factor | ||
609 | */ | ||
610 | static unsigned int | ||
611 | unix_query_keepalive_factor (void *cls) | ||
612 | { | ||
613 | return 3; | ||
614 | } | ||
615 | |||
616 | |||
617 | /** | ||
603 | * Actually send out the message, assume we've got the address and | 618 | * Actually send out the message, assume we've got the address and |
604 | * send_handle squared away! | 619 | * send_handle squared away! |
605 | * | 620 | * |
@@ -1614,6 +1629,7 @@ libgnunet_plugin_transport_unix_init (void *cls) | |||
1614 | api->send = &unix_plugin_send; | 1629 | api->send = &unix_plugin_send; |
1615 | api->disconnect_peer = &unix_peer_disconnect; | 1630 | api->disconnect_peer = &unix_peer_disconnect; |
1616 | api->disconnect_session = &unix_session_disconnect; | 1631 | api->disconnect_session = &unix_session_disconnect; |
1632 | api->query_keepalive_factor = &unix_query_keepalive_factor; | ||
1617 | api->address_pretty_printer = &unix_plugin_address_pretty_printer; | 1633 | api->address_pretty_printer = &unix_plugin_address_pretty_printer; |
1618 | api->address_to_string = &unix_address_to_string; | 1634 | api->address_to_string = &unix_address_to_string; |
1619 | api->check_address = &unix_check_address; | 1635 | api->check_address = &unix_check_address; |