comparison netio.h @ 1072:686cd3e8e13e

avoid malloc for iovec
author Matt Johnston <matt@ucc.asn.au>
date Fri, 20 Mar 2015 22:53:32 +0800
parents c71df09bc610
children 2265d7ebfdeb
comparison
equal deleted inserted replaced
1067:ce21d0bfaf98 1072:686cd3e8e13e
42 void cancel_connect(struct dropbear_progress_connection *c); 42 void cancel_connect(struct dropbear_progress_connection *c);
43 43
44 void connect_set_writequeue(struct dropbear_progress_connection *c, struct Queue *writequeue); 44 void connect_set_writequeue(struct dropbear_progress_connection *c, struct Queue *writequeue);
45 45
46 /* TODO: writev #ifdef guard */ 46 /* TODO: writev #ifdef guard */
47 struct iovec * packet_queue_to_iovec(struct Queue *queue, int *ret_iov_count); 47 /* Fills out iov which contains iov_count slots, returning the number filled in iov_count */
48 void packet_queue_to_iovec(struct Queue *queue, struct iovec *iov, unsigned int *iov_count);
48 void packet_queue_consume(struct Queue *queue, ssize_t written); 49 void packet_queue_consume(struct Queue *queue, ssize_t written);
49 50
50 #ifdef DROPBEAR_TCP_FAST_OPEN 51 #ifdef DROPBEAR_TCP_FAST_OPEN
51 /* Try for any Linux builds, will fall back if the kernel doesn't support it */ 52 /* Try for any Linux builds, will fall back if the kernel doesn't support it */
52 void set_listen_fast_open(int sock); 53 void set_listen_fast_open(int sock);