File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2026,6 +2026,8 @@ msgid ""
20262026"Return the number of bytes sent. (The format of *address* depends on the "
20272027"address family --- see above.)"
20282028msgstr ""
2029+ "发送数据给套接字。本套接字不应连接到远程套接字,而应由 *address* 指定目标套接字。可选参数 *flags* 的含义与上述 "
2030+ ":meth:`recv` 中的相同。本方法返回已发送的字节数。( *address* 的格式取决于地址簇 —— 参见上文。)"
20292031
20302032#: ../../library/socket.rst:1514
20312033msgid ""
@@ -2053,6 +2055,14 @@ msgid ""
20532055"destination address for the message. The return value is the number of "
20542056"bytes of non-ancillary data sent."
20552057msgstr ""
2058+ "将普通数据和辅助数据发送给套接字,将从一系列缓冲区中收集非辅助数据,并将其拼接为一条消息。*buffers* 参数指定的非辅助数据应为可迭代的 "
2059+ ":term:`字节类对象 <bytes-like object>` (如 :class:`bytes` "
2060+ "对象),在允许使用的缓冲区数量上,操作系统可能会有限制( :func:`~os.sysconf` 的 ``SC_IOV_MAX`` "
2061+ "值)。*ancdata* 参数指定的辅助数据(控制消息)应为可迭代对象,迭代出零个或多个 ``(cmsg_level, cmsg_type, "
2062+ "cmsg_data)`` 元组,其中 *cmsg_level* 和 *cmsg_type* 是分别指定协议级别和协议类型的整数,而 "
2063+ "*cmsg_data* 是保存相关数据的字节类对象。请注意,某些系统(特别是没有 :func:`CMSG_SPACE` "
2064+ "的系统)可能每次调用仅支持发送一条控制消息。*flags* 参数默认为 0,与 :meth:`send` 中的含义相同。如果 *address* "
2065+ "指定为除 ``None`` 以外的值,它将作为消息的目标地址。返回值是已发送的非辅助数据的字节数。"
20562066
20572067#: ../../library/socket.rst:1543
20582068msgid ""
You can’t perform that action at this time.
0 commit comments