网络编程问题总结

加油整理中。。。。。。。。。。

1.API

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

函数
序号

函数名

参数备注
1ntohl  
2ntohs  
3htons  
4htons  
5

inet_aton

  
6

inet_addr

  
7

inet_ntoa

  
8

inet_pton

  
9

inet_ntop

  
    
    

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值