@@ -395,39 +395,48 @@ msgid ""
395395"further requests from clients will get a \" Connection denied\" error. The "
396396"default value is usually 5, but this can be overridden by subclasses."
397397msgstr ""
398+ "请求队列的长度。 如果处理单个请求要花费很长的时间,则当服务器正忙时到达的任何请求都会被加入队列,最多加入 "
399+ ":attr:`request_queue_size` 个请求。 一旦队列被加满,来自客户端的更多请求将收到 \" Connection denied\" "
400+ "错误。 默认值为 5,但可在子类中重载。"
398401
399402#: ../../library/socketserver.rst:296
400403msgid ""
401404"The type of socket used by the server; :const:`socket.SOCK_STREAM` and "
402405":const:`socket.SOCK_DGRAM` are two common values."
403406msgstr ""
407+ "服务器使用的套接字类型;常见的有 :const:`socket.SOCK_STREAM` 和 :const:`socket.SOCK_DGRAM` "
408+ "这两个值。"
404409
405410#: ../../library/socketserver.rst:302
406411msgid ""
407412"Timeout duration, measured in seconds, or :const:`None` if no timeout is "
408413"desired. If :meth:`handle_request` receives no incoming requests within the"
409414" timeout period, the :meth:`handle_timeout` method is called."
410415msgstr ""
416+ "超时限制,以秒数表示,或者如果不限制超时则为 :const:`None`。 如果在超时限制期间没有收到 "
417+ ":meth:`handle_request`,则会调用 :meth:`handle_timeout` 方法。"
411418
412419#: ../../library/socketserver.rst:307
413420msgid ""
414421"There are various server methods that can be overridden by subclasses of "
415422"base server classes like :class:`TCPServer`; these methods aren't useful to "
416423"external users of the server object."
417- msgstr ""
424+ msgstr "有多个服务器方法可被服务器基类的子类例如 :class:`TCPServer` 所重载;这些方法对服务器对象的外部用户来说并无用处。 "
418425
419426#: ../../library/socketserver.rst:316
420427msgid ""
421428"Actually processes the request by instantiating :attr:`RequestHandlerClass` "
422429"and calling its :meth:`~BaseRequestHandler.handle` method."
423430msgstr ""
431+ "通过实例化 :attr:`RequestHandlerClass` 并调用其 :meth:`~BaseRequestHandler.handle` "
432+ "方法来实际处理请求。"
424433
425434#: ../../library/socketserver.rst:322
426435msgid ""
427436"Must accept a request from the socket, and return a 2-tuple containing the "
428437"*new* socket object to be used to communicate with the client, and the "
429438"client's address."
430- msgstr ""
439+ msgstr "必须接受来自套接字的请求,并返回一个 2 元组,其中包含用来与客户端通信的 *new* 套接字对象,以及客户端的地址。 "
431440
432441#: ../../library/socketserver.rst:329
433442msgid ""
@@ -436,6 +445,8 @@ msgid ""
436445"action is to print the traceback to standard error and continue handling "
437446"further requests."
438447msgstr ""
448+ "此函数会在 :attr:`RequestHandlerClass` 实例的 :meth:`~BaseRequestHandler.handle` "
449+ "方法引发异常时被调用。 默认行为是将回溯信息打印到标准错误并继续处理其他请求。"
439450
440451#: ../../library/socketserver.rst:334
441452msgid ""
0 commit comments