Linux IO????????ú?????
???????????? ???????[ 2015/7/8 13:34:31 ] ??????????????
????send??????
????#include <sys/types.h>
????#include <sys/socket.h>
????ssize_t send(int s??const void*buf??size_t len??int flags);
????send????????????buf?е??С?len????????????????????????s????flasg???????????????????е??????recv()????£????????????????????????????
?????????????????buf?е????????send????????????????????????????????send()?????????send()??????С??len??????滺?????????в?????????з????????????????·???????????????????????????????????????buf?е?????λ?y????????????С???????????????????
??????send()????-1??????????
????????send()???????????????????????????????????????connect()?????????????????????????????send??write????????????????flag????flag?0???send()??write()???????????send(s??buf??len??flags)??sendto(s??buf??len??flags??NULL??0)??????
????readv????:
????#include <sys/uio.h>
????ssize_t readv(int s??const struct iovec*vector??int count);
????read()??????????????????????readv?????????????????s?ж??count???????????????????vector?С???????????????????????????????-1???????????
???????е????vector???????????????struct iover?????<sys/uio.h>???壺
????1 struct iovec
????2 {
????3 void*iov_base; // ??????????????
????4 size_t iov_len; // ??С????????λ
????5 }
?????????readv???????????iovec??iov_len????????????iov_len?С?????vector???????vector????棬??Сcount?????????????????????????????????
????writev??????
????#include <sys/uio.h>
????ssize_t writev(int s??const struct iovec*vector??int count);
????//// ???????ú?readv???
???????
?????±??????????????????????O????????????????
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11