Skip to content

Commit

Permalink
样式
Browse files Browse the repository at this point in the history
  • Loading branch information
LahmYing committed May 23, 2019
1 parent 99252d3 commit 3ae6e05
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion source/blocks/socket.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ usocket.socket(af=AF_INET, type=SOCK_STREAM, proto=IPPROTO_TCP)

**参数:**

- ``af`` - 地址。``socket.AF_INET``:=2 — TCP/IP – IPv4;``socket.AF_INET6``:=10 — TCP/IP – IPv6
- ``af`` - 地址。
- ``socket.AF_INET``:=2 — TCP/IP – IPv4;
- ``socket.AF_INET6``:=10 — TCP/IP – IPv6
- ``type`` - socket 类型。``socket.SOCK_STREAM``:=1 — TCP 流;``socket.SOCK_DGRAM``:=2 — UDP 数据报;``socket.SOCK_RAW``:=3 — 原始套接字;``socket.SO_REUSEADDR``:=4 — socket可重用
- ``proto`` - 协议号。``socket.IPPROTO_TCP``:=6;``socket.IPPROTO_UDP``:=17。一般不指定proto参数,因为有些MicroPython固件提供默认参数

Expand Down

0 comments on commit 3ae6e05

Please sign in to comment.