summaryrefslogtreecommitdiffstats
path: root/src/task.h
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2013-08-28 23:34:55 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2013-08-29 00:45:13 +0200
commitdcaf41a18e1bd9014d1cf3ca7a7129a1be76e811 (patch)
tree024ee42fb7f76ed8e2fb4c1a5ec66031cdcc26b6 /src/task.h
parent2343f5329c0d5e7d8073810e56577d944b7c518e (diff)
downloadfastd-dcaf41a18e1bd9014d1cf3ca7a7129a1be76e811.tar
fastd-dcaf41a18e1bd9014d1cf3ca7a7129a1be76e811.zip
Simplify keepalive sending
By using a global keepalive timer, the O(n) keepalive queue purge operation on every send operation is avoided.
Diffstat (limited to 'src/task.h')
-rw-r--r--src/task.h9
1 files changed, 0 insertions, 9 deletions
diff --git a/src/task.h b/src/task.h
index d80ddd6..ae6b1f3 100644
--- a/src/task.h
+++ b/src/task.h
@@ -33,15 +33,9 @@
#include <sys/uio.h>
-typedef enum fastd_task_type {
- TASK_HANDSHAKE,
- TASK_KEEPALIVE,
-} fastd_task_type_t;
-
typedef struct fastd_task {
fastd_queue_entry_t entry;
- fastd_task_type_t type;
fastd_peer_t *peer;
} fastd_task_t;
@@ -54,10 +48,7 @@ static inline int fastd_task_timeout(fastd_context_t *ctx) {
fastd_task_t* fastd_task_get(fastd_context_t *ctx);
void fastd_task_schedule_handshake(fastd_context_t *ctx, fastd_peer_t *peer, int timeout);
-void fastd_task_schedule_keepalive(fastd_context_t *ctx, fastd_peer_t *peer, int timeout);
void fastd_task_delete_peer(fastd_context_t *ctx, fastd_peer_t *peer);
-void fastd_task_delete_peer_handshakes(fastd_context_t *ctx, fastd_peer_t *peer);
-void fastd_task_delete_peer_keepalives(fastd_context_t *ctx, fastd_peer_t *peer);
#endif /* _FASTD_TASK_H_ */