用户工具

站点工具


协议学习:network网络:socket类型

差别

这里会显示出您选择的修订版和当前版本之间的差别。

到此差别页面的链接

两侧同时换到之前的修订记录前一修订版
协议学习:network网络:socket类型 [2026/10/13 22:06] – 外部编辑 127.0.0.1协议学习:network网络:socket类型 [2026/10/13 22:51] (当前版本) – 外部编辑 127.0.0.1
行 2: 行 2:
 [TCP和UDP的区别(Socket)](https://www.cnblogs.com/nieliangcai/p/10362751.html) [TCP和UDP的区别(Socket)](https://www.cnblogs.com/nieliangcai/p/10362751.html)
  
-<code>+ 
 +```
 AF_UNIX(本机通信) AF_UNIX(本机通信)
 AF_INET(TCP/IP – IPv4) AF_INET(TCP/IP – IPv4)
行 10: 行 11:
 SOCK_DGRAM(UDP数据报) SOCK_DGRAM(UDP数据报)
 SOCK_RAW(原始套接字) SOCK_RAW(原始套接字)
-</code>+``` 
  
 https://www.cnblogs.com/sanjianghuiliu/p/4653906.html https://www.cnblogs.com/sanjianghuiliu/p/4653906.html
行 31: 行 33:
  
 ## - python socket ## - python socket
-<code>+ 
 +```
 socket.socket(family=AF_INET, type=SOCK_STREAM, proto=0, fileno=None) socket.socket(family=AF_INET, type=SOCK_STREAM, proto=0, fileno=None)
-</code>+``` 
  
 Create a new socket using the given address family, socket type and protocol number. The address family should be AF_INET (the default), AF_INET6, AF_UNIX, AF_CAN, AF_PACKET, or AF_RDS. The socket type should be SOCK_STREAM (the default), SOCK_DGRAM, SOCK_RAW or perhaps one of the other SOCK_ constants. The protocol number is usually zero and may be omitted or in the case where the address family is AF_CAN the protocol should be one of CAN_RAW, CAN_BCM or CAN_ISOTP. Create a new socket using the given address family, socket type and protocol number. The address family should be AF_INET (the default), AF_INET6, AF_UNIX, AF_CAN, AF_PACKET, or AF_RDS. The socket type should be SOCK_STREAM (the default), SOCK_DGRAM, SOCK_RAW or perhaps one of the other SOCK_ constants. The protocol number is usually zero and may be omitted or in the case where the address family is AF_CAN the protocol should be one of CAN_RAW, CAN_BCM or CAN_ISOTP.
协议学习/network网络/socket类型.1791900372.txt.gz · 最后更改: 由 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki