mirror of /home/gitosis/repositories/libowfat.git
test for BSD sendfile
parent
7497685b8b
commit
b67f816052
@ -0,0 +1,16 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/uio.h>
|
||||
#include <errno.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/tcp.h>
|
||||
|
||||
int main() {
|
||||
struct sf_hdtr hdr;
|
||||
struct iovec v[17+23];
|
||||
int r,fd=1;
|
||||
off_t sbytes;
|
||||
hdr.headers=v; hdr.hdr_cnt=17;
|
||||
hdr.trailers=v+headers; hdr.trl_cnt=23;
|
||||
r=sendfile(0,1,37,42,&hdr,&sbytes,0);
|
||||
}
|
Loading…
Reference in New Issue