diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2013-12-18 11:31:04 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2013-12-18 11:31:04 +0000 |
commit | 24217860d278d086472f512948bbc55623a58ccf (patch) | |
tree | 01b35c8f17788f8b7a8917ea8503723ff2966ac5 | |
parent | 9e7b7ac944811f00132e7f54dc4a5f583a1326dd (diff) | |
download | gnunet-24217860d278d086472f512948bbc55623a58ccf.tar.gz gnunet-24217860d278d086472f512948bbc55623a58ccf.zip |
new api function for timeouts
-rw-r--r-- | src/include/gnunet_transport_plugin.h | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/src/include/gnunet_transport_plugin.h b/src/include/gnunet_transport_plugin.h index f05048e96..9df077823 100644 --- a/src/include/gnunet_transport_plugin.h +++ b/src/include/gnunet_transport_plugin.h | |||
@@ -74,14 +74,13 @@ struct SessionHeader | |||
74 | * | 74 | * |
75 | * @param cls closure | 75 | * @param cls closure |
76 | * @param peer which peer was the session for | 76 | * @param peer which peer was the session for |
77 | * @param session which session is being destoyed | 77 | * @param session which session is being destroyed |
78 | */ | 78 | */ |
79 | typedef void | 79 | typedef void |
80 | (*GNUNET_TRANSPORT_SessionEnd) (void *cls, | 80 | (*GNUNET_TRANSPORT_SessionEnd) (void *cls, |
81 | const struct GNUNET_PeerIdentity *peer, | 81 | const struct GNUNET_PeerIdentity *peer, |
82 | struct Session *session); | 82 | struct Session *session); |
83 | 83 | ||
84 | |||
85 | /** | 84 | /** |
86 | * Function that will be called whenever the plugin internally | 85 | * Function that will be called whenever the plugin internally |
87 | * creates a new session and hence transport need to tell ATS. | 86 | * creates a new session and hence transport need to tell ATS. |
@@ -107,7 +106,6 @@ typedef void | |||
107 | const struct GNUNET_ATS_Information *ats, | 106 | const struct GNUNET_ATS_Information *ats, |
108 | uint32_t ats_count); | 107 | uint32_t ats_count); |
109 | 108 | ||
110 | |||
111 | /** | 109 | /** |
112 | * Function called by the transport for each received message. | 110 | * Function called by the transport for each received message. |
113 | * This function should also be called with "NULL" for the | 111 | * This function should also be called with "NULL" for the |
@@ -490,6 +488,19 @@ typedef struct Session * | |||
490 | (*GNUNET_TRANSPORT_CreateSession) (void *cls, | 488 | (*GNUNET_TRANSPORT_CreateSession) (void *cls, |
491 | const struct GNUNET_HELLO_Address *address); | 489 | const struct GNUNET_HELLO_Address *address); |
492 | 490 | ||
491 | /** | ||
492 | * Function that will be called whenever the transport service wants to | ||
493 | * notify the plugin that a session is still active and in use and | ||
494 | * therefore the session timeout for this session has to be updated | ||
495 | * | ||
496 | * @param cls closure | ||
497 | * @param peer which peer was the session for | ||
498 | * @param session which session is being updated | ||
499 | */ | ||
500 | typedef void | ||
501 | (*GNUNET_TRANSPORT_UpdateSessionTimeout) (void *cls, | ||
502 | const struct GNUNET_PeerIdentity *peer, | ||
503 | struct Session *session); | ||
493 | 504 | ||
494 | /** | 505 | /** |
495 | * Function called for a quick conversion of the binary address to | 506 | * Function called for a quick conversion of the binary address to |
@@ -576,6 +587,13 @@ struct GNUNET_TRANSPORT_PluginFunctions | |||
576 | GNUNET_TRANSPORT_DisconnectSessionFunction disconnect_session; | 587 | GNUNET_TRANSPORT_DisconnectSessionFunction disconnect_session; |
577 | 588 | ||
578 | /** | 589 | /** |
590 | * Function that will be called whenever the transport service wants to | ||
591 | * notify the plugin that a session is still active and in use and | ||
592 | * therefore the session timeout for this session has to be updated | ||
593 | */ | ||
594 | GNUNET_TRANSPORT_UpdateSessionTimeout update_session_timeout; | ||
595 | |||
596 | /** | ||
579 | * Function that is used to query keepalive factor. | 597 | * Function that is used to query keepalive factor. |
580 | * GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT is divided by this number to | 598 | * GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT is divided by this number to |
581 | * calculate the interval between keepalive packets. | 599 | * calculate the interval between keepalive packets. |