Skip to content

Instantly share code, notes, and snippets.

View lwan_writev_new.c
ssize_t
lwan_writev(lwan_request_t *request, struct iovec *iov, int iov_count) {
ssize_t total_written = 0;
int curr_iov = 0;
/* Write header */
ssize_t written = write(request->fd, iov[0].iov_base, iov[0].iov_len);
/* Write data */