| 1 | module veb |
| 2 | |
| 3 | #include <sys/sendfile.h> |
| 4 | |
| 5 | fn C.sendfile(out_fd i32, in_fd i32, offset voidptr, count i32) i32 |
| 6 | |
| 7 | fn sendfile(out_fd int, in_fd int, nr_bytes int) int { |
| 8 | // always pass nil as offset, so the file offset will be used and updated. |
| 9 | return C.sendfile(out_fd, in_fd, 0, nr_bytes) |
| 10 | } |
| 11 |