加油整理中。。。。。。。。。。
1.API
序号 | |||
1.字节序函数 | |||
2.字节操作函数 | | ||
3.地址转换函数 | |||
4.readn、writen和readline | |||
5.测试描述符类型 | |||
6.socket函数 | |||
7.connect函数 | |||
8.bind函数 | |||
9.listen函数 | |||
10.accept函数 | |||
11.close函数 | |||
12.getsockname和getpeername | |||
13.select函数 | |||
14.shutdown函数 | |||
15.pselect函数 | |||
16.poll函数 | |||
17.getsockopt和setsockopt | |||
18.套接口选项列表 | |||
19.处理套接口的fcntl函数 | |||
20.gethostbyname函数 | |||
21.gethostbyname2函数 | |||
22.gethostbyaddr函数 | |||
23.uname函数 | |||
24.gethostname函数 | |||
25.getservbyname函数 | |||
26.getservbyport函数 | |||
27.recv和send | |||
28.readv和writev | |||
29.readmsg和writemsg | |||
30.socketpair函数 | |||
31.套接口ioctl函数 |
1. IPv4套接字地址结构:
struct sockaddr_in {
sa_family_t sin_family;
in_port_t sin_port;
structin_addr sin_addr;
};
Posix规范只需要这三个字段,定义额外的字段是可接受的。地址总是采用网络字节序(大端)来存储的。
2. 通用套接字地址结构:
struct sockaddr{
uint8_t sa_len;
sa_family_t sa_family;
char sa_data[14];
};
socket
https://blog.csdn.net/linglongbayinhe/article/details/83214171
https://blog.csdn.net/a2796749/article/details/46362065
https://blog.csdn.net/linglongbayinhe/article/details/83214171
2.大段和小端
https://www.cnblogs.com/liqiu/archive/2013/03/26/2982406.html
https://www.cnblogs.com/little-white/p/3236548.html
3.网络编程
https://www.cnblogs.com/glacierh/p/4805243.html
1.TCP套接字编程
1.TCP异常情况
2.Unix域协议
3.UDP套接字编程
3.函数转换
https://blog.csdn.net/baidu_41388533/article/details/108211953
https://blog.csdn.net/myyllove/article/details/83380209
序号 | 函数名 | 参数 | 备注 |
1 | ntohl | ||
2 | ntohs | ||
3 | htons | ||
4 | htons | ||
5 | inet_aton | ||
6 | inet_addr | ||
7 | inet_ntoa | ||
8 | inet_pton | ||
9 | inet_ntop | ||