summaryrefslogtreecommitdiffstats
path: root/src/task.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/task.h')
-rw-r--r--src/task.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/task.h b/src/task.h
index fbf2c63..b65e992 100644
--- a/src/task.h
+++ b/src/task.h
@@ -39,6 +39,11 @@ typedef enum _fastd_task_type {
TASK_HANDSHAKE,
} fastd_task_type;
+typedef struct _fastd_task_any {
+ fastd_task_type type;
+ fastd_peer *peer;
+} fastd_task_any;
+
typedef struct _fastd_task_send {
fastd_task_type type;
fastd_peer *peer;
@@ -59,7 +64,7 @@ typedef struct _fastd_task_handshake {
} fastd_task_handshake;
typedef union _fastd_task {
- fastd_task_type type;
+ fastd_task_any any;
fastd_task_send send;
fastd_task_handle_recv handle_recv;
fastd_task_handshake handshake;
@@ -78,4 +83,6 @@ void fastd_task_put_handle_recv(fastd_context *ctx, fastd_peer *peer, fastd_buff
void fastd_task_schedule_handshake(fastd_context *ctx, fastd_peer *peer, int timeout);
+void fastd_task_delete_peer(fastd_context *ctx, fastd_peer *peer);
+
#endif /* _FASTD_TASK_H_ */