summaryrefslogtreecommitdiff
path: root/code/timer.h
diff options
context:
space:
mode:
authorUros Majstorovic <majstor@majstor.org>2017-05-23 14:19:26 +0200
committerUros Majstorovic <majstor@majstor.org>2017-05-23 14:19:26 +0200
commit3ef6719f47b734b12c0b11c725b7f12e3fb3c08a (patch)
treea635ac65bfc72d126d97e48e22c38ac33343b4f4 /code/timer.h
parent922e8313f2b3f6157a61b3c867fdc3832bb92a68 (diff)
fs layout updated
Diffstat (limited to 'code/timer.h')
-rw-r--r--code/timer.h43
1 files changed, 0 insertions, 43 deletions
diff --git a/code/timer.h b/code/timer.h
deleted file mode 100644
index 0d43a99..0000000
--- a/code/timer.h
+++ /dev/null
@@ -1,43 +0,0 @@
-#define ECP_MAX_TIMER 8
-
-#define ECP_ERR_MAX_TIMER -110
-
-#include <stddef.h>
-
-#ifdef ECP_WITH_PTHREAD
-#include <pthread.h>
-#endif
-
-struct ECPConnection;
-struct ECPSocket;
-struct ECPTimerItem;
-
-typedef ssize_t ecp_timer_retry_t (struct ECPConnection *, struct ECPTimerItem *);
-
-typedef struct ECPTimerItem {
- struct ECPConnection *conn;
- unsigned char mtype;
- unsigned short cnt;
- unsigned int abstime;
- unsigned int timeout;
- ecp_timer_retry_t *retry;
- unsigned char *pld;
- size_t pld_size;
-} ECPTimerItem;
-
-typedef struct ECPTimer {
- ECPTimerItem item[ECP_MAX_TIMER];
- short head;
-#ifdef ECP_WITH_PTHREAD
- pthread_mutex_t mutex;
-#endif
-} ECPTimer;
-
-int ecp_timer_create(ECPTimer *timer);
-void ecp_timer_destroy(ECPTimer *timer);
-int ecp_timer_item_init(ECPTimerItem *ti, struct ECPConnection *conn, unsigned char mtype, unsigned short cnt, unsigned int timeout);
-int ecp_timer_push(ECPTimerItem *ti);
-void ecp_timer_pop(struct ECPConnection *conn, unsigned char mtype);
-void ecp_timer_remove(struct ECPConnection *conn);
-unsigned int ecp_timer_exe(struct ECPSocket *sock);
-ssize_t ecp_timer_send(struct ECPConnection *conn, ecp_timer_retry_t *send_f, unsigned char mtype, unsigned short cnt, unsigned int timeout); \ No newline at end of file