diff options
Diffstat (limited to 'src/task.h')
-rw-r--r-- | src/task.h | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -36,6 +36,7 @@ typedef enum _fastd_task_type { TASK_SEND, TASK_HANDLE_RECV, + TASK_HANDSHAKE, } fastd_task_type; typedef struct _fastd_task_send { @@ -52,10 +53,16 @@ typedef struct _fastd_task_handle_recv { fastd_buffer buffer; } fastd_task_handle_recv; +typedef struct _fastd_task_handshake { + fastd_task_type type; + fastd_peer *peer; +} fastd_task_handshake; + typedef union _fastd_task { fastd_task_type type; fastd_task_send send; fastd_task_handle_recv handle_recv; + fastd_task_handshake handshake; } fastd_task; @@ -69,4 +76,6 @@ void fastd_task_put_send_handshake(fastd_context *ctx, const fastd_peer *peer, f void fastd_task_put_send(fastd_context *ctx, const fastd_peer *peer, fastd_buffer buffer); void fastd_task_put_handle_recv(fastd_context *ctx, const fastd_peer *peer, fastd_buffer buffer); +void fastd_task_schedule_handshake(fastd_context *ctx, fastd_peer *peer, int timeout); + #endif /* _FASTD_TASK_H_ */ |