diff options
Diffstat (limited to 'src/transport/plugin_transport_tcp.c')
-rw-r--r-- | src/transport/plugin_transport_tcp.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/transport/plugin_transport_tcp.c b/src/transport/plugin_transport_tcp.c index e22e01cee..992729911 100644 --- a/src/transport/plugin_transport_tcp.c +++ b/src/transport/plugin_transport_tcp.c | |||
@@ -865,6 +865,21 @@ tcp_disconnect_session (void *cls, | |||
865 | 865 | ||
866 | 866 | ||
867 | /** | 867 | /** |
868 | * Function that is called to get the keepalive factor. | ||
869 | * GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT is divided by this number to | ||
870 | * calculate the interval between keepalive packets. | ||
871 | * | ||
872 | * @param cls closure with the `struct Plugin` | ||
873 | * @return keepalive factor | ||
874 | */ | ||
875 | static unsigned int | ||
876 | tcp_query_keepalive_factor (void *cls) | ||
877 | { | ||
878 | return 3; | ||
879 | } | ||
880 | |||
881 | |||
882 | /** | ||
868 | * Session was idle, so disconnect it | 883 | * Session was idle, so disconnect it |
869 | * | 884 | * |
870 | * @param cls the `struct Session` of the idle session | 885 | * @param cls the `struct Session` of the idle session |
@@ -2665,6 +2680,7 @@ libgnunet_plugin_transport_tcp_init (void *cls) | |||
2665 | api->get_session = &tcp_plugin_get_session; | 2680 | api->get_session = &tcp_plugin_get_session; |
2666 | 2681 | ||
2667 | api->disconnect_session = &tcp_disconnect_session; | 2682 | api->disconnect_session = &tcp_disconnect_session; |
2683 | api->query_keepalive_factor = &tcp_query_keepalive_factor; | ||
2668 | api->disconnect_peer = &tcp_plugin_disconnect; | 2684 | api->disconnect_peer = &tcp_plugin_disconnect; |
2669 | api->address_pretty_printer = &tcp_plugin_address_pretty_printer; | 2685 | api->address_pretty_printer = &tcp_plugin_address_pretty_printer; |
2670 | api->check_address = &tcp_plugin_check_address; | 2686 | api->check_address = &tcp_plugin_check_address; |