0
点赞
收藏
分享

微信扫一扫

go的并发任务如何优雅的实现错误终止

Star英 2024-08-09 阅读 25

在linux中,sendfile()函数在<sys/sendfile.h>库中

在mac中,sendfile()函数在

#include <sys/types.h>

#include <sys/socket.h>

#include <sys/uio.h>

库中,mac中可参考该博客

Mac OS X Manual Page For sendfile(2)

在mac中参数是六个:

int sendfile(int fd, int s, off_t offset, off_t *len, struct sf_hdtr *hdtr, int flags);

linux中是四个

ssize_t sendfile(int out_fd, int in_fd, off_t *offset, size_t count);

有关零拷贝的概念以及零拷贝和write,mmap的区别,可参考这个博客

https://www.6aiq.com/article/1577782022362

举报

相关推荐

0 条评论