![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
apue
YelloZhg
勿忘初心。
活在当下。
展开
-
select()
#include int select(int maxfdp1, fd_set *restrictreadfds,fd_set *restrict writefds, fd_set *restrict exceptfds,struct timeval *restrict tvptr)select():do I/O multiplexing (用于检测多个文件句柄的变化)原创 2014-05-16 17:06:00 · 283 阅读 · 0 评论 -
fgets()
#include char *fgets(char *restrict buf, int n,FILE *restrict fp)fgets():Line-at-a-time input (每次仅读取一行输入的函数))buf: the buffer to read the line into(内存空间,用于存放读取到的一行数据)n: sizeof原创 2014-05-16 08:16:00 · 418 阅读 · 0 评论 -
openlog()
#include void openlog(const char *ident, intoption, int facility)openlog():openloglets us specify an ident that is added to each logmessage. This is normally thename of the program (cron, inet原创 2014-05-15 21:08:12 · 1330 阅读 · 0 评论 -
htonl、htons、ntohl、ntohs
由于本机存储数据的格式和网络传输的数据字节顺序原创 2014-05-18 22:32:49 · 702 阅读 · 0 评论 -
getopt()
page815#include int getopt(int argc, const *const argv[],const char *options)getopt():命令行选项参数的解析函数argc: (main函数传入的参数argc,参数的总个数)argv: (main函数传入的参数argv)options:原创 2014-05-17 23:07:47 · 411 阅读 · 0 评论 -
socket
#include int socket(int domain, int type, int protocol)功能: create aconnection 建立一个网络连接,目的ip地址信息在addr中参数: addr-server addr Theaddress we specify with connectis the address of the serv原创 2014-05-18 21:28:32 · 328 阅读 · 0 评论 -
shutdown
#include int shutdown(int sockfd, int how)shutdown(): (创建一个抽象的通讯端点socket,类似于file descriptor的概念,其目的用于对网络通讯的操作)domain:determines the nature of the communication ,including th原创 2014-05-18 21:38:06 · 239 阅读 · 0 评论