File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2351,10 +2351,18 @@ msgid ""
23512351"not :meth:`~socket.sendall`/:meth:`~socket.recv` on the socket it is "
23522352"listening on but on the new socket returned by :meth:`~socket.accept`."
23532353msgstr ""
2354+ "以下是 4 个使用 TCP/IP "
2355+ "协议的最小示例程序:一台服务器,它将收到的所有数据原样返回(仅服务于一个客户端),还有一个使用该服务器的客户端。注意,服务器必须按序执行 "
2356+ ":func:`.socket`, :meth:`~socket.bind`, :meth:`~socket.listen`, "
2357+ ":meth:`~socket.accept` (可能需要重复执行 :meth:`~socket.accept` "
2358+ "以服务多个客户端),而客户端仅需要按序执行 :func:`.socket`, "
2359+ ":meth:`~socket.connect`。还须注意,服务器不在侦听套接字上发送 "
2360+ ":meth:`~socket.sendall`/:meth:`~socket.recv`,而是在 :meth:`~socket.accept` "
2361+ "返回的新套接字上发送。"
23542362
23552363#: ../../library/socket.rst:1766
23562364msgid "The first two examples support IPv4 only. ::"
2357- msgstr ""
2365+ msgstr "前两个示例仅支持 IPv4。 :: "
23582366
23592367#: ../../library/socket.rst:1797
23602368msgid ""
You can’t perform that action at this time.
0 commit comments