@@ -310,21 +310,23 @@ msgid ""
310310"Read at most *buffer_size* bytes from the socket's remote end-point. An "
311311"empty bytes object implies that the channel has been closed from the other "
312312"end."
313- msgstr ""
313+ msgstr "从套接字的远程端点读取至多 *buffer_size* 个字节。 读到空字节串表明通道已从另一端被关闭。 "
314314
315315#: ../../library/asyncore.rst:223
316316msgid ""
317317"Note that :meth:`recv` may raise :exc:`BlockingIOError` , even though "
318318":func:`select.select` or :func:`select.poll` has reported the socket ready "
319319"for reading."
320320msgstr ""
321+ "请注意 :meth:`recv` 可能会引发 :exc:`BlockingIOError`,即使 :func:`select.select` 或 "
322+ ":func:`select.poll` 报告套接字已准备好被读取。"
321323
322324#: ../../library/asyncore.rst:230
323325msgid ""
324326"Listen for connections made to the socket. The *backlog* argument specifies"
325327" the maximum number of queued connections and should be at least 1; the "
326328"maximum value is system-dependent (usually 5)."
327- msgstr ""
329+ msgstr "侦听与套接字的连接。 *backlog* 参数指明排入连接队列的最大数量且至少应为 1;最大值取决于具体系统(通常为 5)。 "
328330
329331#: ../../library/asyncore.rst:237
330332msgid ""
@@ -334,6 +336,9 @@ msgid ""
334336"re-usable (setting the :const:`SO_REUSEADDR` option), call the "
335337":class:`dispatcher` object's :meth:`set_reuse_addr` method."
336338msgstr ""
339+ "将套接字绑定到 *address*。 套接字必须尚未被绑定。 (*address* 的格式取决于具体的地址族 --- 请参阅 "
340+ ":mod:`socket` 文档了解更多信息。) 要将套接字标记为可重用的 (设置 :const:`SO_REUSEADDR` 选项),请调用 "
341+ ":class:`dispatcher` 对象的 :meth:`set_reuse_addr` 方法。"
337342
338343#: ../../library/asyncore.rst:246
339344msgid ""
@@ -345,20 +350,26 @@ msgid ""
345350"connection didn't take place, in which case the server should just ignore "
346351"this event and keep listening for further incoming connections."
347352msgstr ""
353+ "接受一个连接。 此套接字必须绑定到一个地址上并且侦听连接。 返回值可以是 ``None`` 或一个 ``(conn, address)`` 对,其中 "
354+ "*conn* 是一个可用来在此连接上发送和接收数据的 *新的* 套接字对象,而 *address* 是绑定到连接另一端套接字的地址。 当返回 "
355+ "``None`` 时意味着连接没有建立,在此情况下服务器应当忽略此事件并继续侦听后续的入站连接。"
348356
349357#: ../../library/asyncore.rst:258
350358msgid ""
351359"Close the socket. All future operations on the socket object will fail. The"
352360" remote end-point will receive no more data (after queued data is flushed)."
353361" Sockets are automatically closed when they are garbage-collected."
354362msgstr ""
363+ "关闭套接字。 在此套接字对象上的后续操作都将失败。 远程端点将不再接收任何数据(在排入队列的数据被清空之后)。 当套接字被垃圾回收时会自动关闭。"
355364
356365#: ../../library/asyncore.rst:266
357366msgid ""
358367"A :class:`dispatcher` subclass which adds simple buffered output capability,"
359368" useful for simple clients. For more sophisticated usage use "
360369":class:`asynchat.async_chat`."
361370msgstr ""
371+ ":class:`dispatcher` 的一个添加了简单缓冲输出功能的子类,适用于简单客户端。 对于更复杂的用法请使用 "
372+ ":class:`asynchat.async_chat`。"
362373
363374#: ../../library/asyncore.rst:272
364375msgid ""
@@ -368,6 +379,9 @@ msgid ""
368379":c:func:`fileno` method, that method will be called and passed to the "
369380":class:`file_wrapper` constructor."
370381msgstr ""
382+ "file_dispatcher 接受一个文件描述符或 :term:`file object` 以及一个可选的 map 参数,并对其进行包装以配合 "
383+ ":c:func:`poll` 或 :c:func:`loop` 函数使用。 如果提供一个文件对象或任何具有 :c:func:`fileno` "
384+ "方法的对象,其方法将被调用并传递给 :class:`file_wrapper` 构造器。"
371385
372386#: ../../library/asyncore.rst:278 ../../library/asyncore.rst:287
373387msgid ":ref:`Availability <availability>`: Unix."
@@ -380,23 +394,25 @@ msgid ""
380394" of the file_wrapper. This class implements sufficient methods to emulate a"
381395" socket for use by the :class:`file_dispatcher` class."
382396msgstr ""
397+ "file_wrapper 接受一个整数形式的文件描述符并调用 :func:`os.dup` 来复制其句柄,以便原始句柄可以独立于 "
398+ "file_wrapper 被关闭。 这个类实现了足够的方法来模拟套接字以供 :class:`file_dispatcher` 类使用。"
383399
384400#: ../../library/asyncore.rst:293
385401msgid "asyncore Example basic HTTP client"
386- msgstr ""
402+ msgstr "asyncore 示例基本 HTTP 客户端 "
387403
388404#: ../../library/asyncore.rst:295
389405msgid ""
390406"Here is a very basic HTTP client that uses the :class:`dispatcher` class to "
391407"implement its socket handling::"
392- msgstr ""
408+ msgstr "下面是一个非常基本的 HTTP 客户端,它使用了 :class:`dispatcher` 类来实现套接字处理:: "
393409
394410#: ../../library/asyncore.rst:332
395411msgid "asyncore Example basic echo server"
396- msgstr ""
412+ msgstr "asyncore 示例基本回显服务器 "
397413
398414#: ../../library/asyncore.rst:334
399415msgid ""
400416"Here is a basic echo server that uses the :class:`dispatcher` class to "
401417"accept connections and dispatches the incoming connections to a handler::"
402- msgstr ""
418+ msgstr "下面是一个基本的回显服务器,它使用了 :class:`dispatcher` 类来接受连接并将入站连接发送给处理程序:: "
0 commit comments