diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2012-02-28 01:05:32 +0100 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2012-02-28 01:05:32 +0100 |
commit | ac8a726ad658e35cf73d4a62646cbe5ba3e38da4 (patch) | |
tree | 51e034f82db30cd0572d188ae9a2611df18404f1 /src/task.h | |
parent | c0f7708f4a36074817556d0966aeb54cc64a5b88 (diff) | |
download | fastd-ac8a726ad658e35cf73d4a62646cbe5ba3e38da4.tar fastd-ac8a726ad658e35cf73d4a62646cbe5ba3e38da4.zip |
Make simple handshake work
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_ */ |