]> git.scottworley.com Git - tattlekey/blob - client/sends.c
client: Start moving pending-sends logic out to sends.c
[tattlekey] / client / sends.c
1 #include "sends.h"
2
3 uint32_t next_send(send_t *s) {
4 return s->timestamp + (1 << s->send_count) - 1;
5 }
6
7 bool next_send_less_than(void *user_data, pheap_node_id_t a,
8 pheap_node_id_t b) {
9 send_t *sends = (send_t *)user_data;
10 return next_send(&sends[a]) < next_send(&sends[b]);
11 }