summaryrefslogtreecommitdiffstats
path: root/src/task.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/task.c')
-rw-r--r--src/task.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/task.c b/src/task.c
index 0367cb4..2de03b1 100644
--- a/src/task.c
+++ b/src/task.c
@@ -61,3 +61,12 @@ void fastd_task_put_handle_recv(fastd_context *ctx, const fastd_peer *peer, fast
fastd_queue_put(&ctx->task_queue, task, 0);
}
+
+void fastd_task_schedule_handshake(fastd_context *ctx, fastd_peer *peer, int timeout) {
+ fastd_task_handshake *task = malloc(sizeof(fastd_task_handshake));
+
+ task->type = TASK_HANDSHAKE;
+ task->peer = peer;
+
+ fastd_queue_put(&ctx->task_queue, task, timeout);
+}