diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2012-04-14 16:59:54 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2012-04-14 16:59:54 +0200 |
commit | b9054051b9bf232968dc52b4732a65381c6a0e5f (patch) | |
tree | 9c9eaf61dbde5a48f09e097ab8ee4ecad37e06e0 /src/task.h | |
parent | 74f2d0357f87a231e3782d3d8bd21853fb3524b2 (diff) | |
download | fastd-b9054051b9bf232968dc52b4732a65381c6a0e5f.tar fastd-b9054051b9bf232968dc52b4732a65381c6a0e5f.zip |
Reduce task queue usage
Diffstat (limited to 'src/task.h')
-rw-r--r-- | src/task.h | 21 |
1 files changed, 0 insertions, 21 deletions
@@ -34,8 +34,6 @@ typedef enum _fastd_task_type { - TASK_SEND, - TASK_HANDLE_RECV, TASK_HANDSHAKE, TASK_KEEPALIVE, } fastd_task_type; @@ -43,25 +41,11 @@ typedef enum _fastd_task_type { typedef struct _fastd_task_any { } fastd_task_any; -typedef struct _fastd_task_send { - fastd_packet_type packet_type; - fastd_buffer buffer; -} fastd_task_send; - -typedef struct _fastd_task_handle_recv { - fastd_buffer buffer; -} fastd_task_handle_recv; - typedef struct _fastd_task { fastd_queue_entry entry; fastd_task_type type; fastd_peer *peer; - - union { - fastd_task_send send; - fastd_task_handle_recv handle_recv; - }; } fastd_task; @@ -72,11 +56,6 @@ static inline int fastd_task_timeout(fastd_context *ctx) { fastd_task* fastd_task_get(fastd_context *ctx); -void fastd_task_put_send_handshake(fastd_context *ctx, fastd_peer *peer, fastd_buffer buffer); - -void fastd_task_put_send(fastd_context *ctx, fastd_peer *peer, fastd_buffer buffer); -void fastd_task_put_handle_recv(fastd_context *ctx, fastd_peer *peer, fastd_buffer buffer); - void fastd_task_schedule_handshake(fastd_context *ctx, fastd_peer *peer, int timeout); void fastd_task_schedule_keepalive(fastd_context *ctx, fastd_peer *peer, int timeout); |