PageRenderTime 69ms CodeModel.GetById 23ms RepoModel.GetById 1ms app.codeStats 0ms

/locale/ja/LC_MESSAGES/library/socket.po

https://bitbucket.org/pydocja/py33
Portable Object | 1669 lines | 1470 code | 199 blank | 0 comment | 0 complexity | 12c854caa4679aa02bb96e8c20e36467 MD5 | raw file
  1. # SOME DESCRIPTIVE TITLE.
  2. # Copyright (C) 1990-2013, Python Software Foundation
  3. # This file is distributed under the same license as the Python package.
  4. #
  5. # Translators:
  6. # ryosuke.mondo <ryosuke.mondo@gmail.com>, 2012
  7. msgid ""
  8. msgstr ""
  9. "Project-Id-Version: (Deprecated)Python Document Japanese\n"
  10. "Report-Msgid-Bugs-To: \n"
  11. "POT-Creation-Date: 2013-12-30 03:15+0900\n"
  12. "PO-Revision-Date: 2014-01-07 09:40+0000\n"
  13. "Last-Translator: Naoki INADA <songofacandy@gmail.com>\n"
  14. "Language-Team: Japanese (http://www.transifex.com/projects/p/python-doc-ja/language/ja/)\n"
  15. "MIME-Version: 1.0\n"
  16. "Content-Type: text/plain; charset=UTF-8\n"
  17. "Content-Transfer-Encoding: 8bit\n"
  18. "Language: ja\n"
  19. "Plural-Forms: nplurals=1; plural=0;\n"
  20. # 0236b58df588443eb76a12ea95636e8d
  21. #: ../../library/socket.rst:2
  22. msgid ":mod:`socket` --- Low-level networking interface"
  23. msgstr ":mod:`socket` --- 低レベルネットワークインターフェース"
  24. # 39ac663abd6946c1acad4bb1e2679a2b
  25. #: ../../library/socket.rst:8
  26. msgid ""
  27. "This module provides access to the BSD *socket* interface. It is available "
  28. "on all modern Unix systems, Windows, MacOS, OS/2, and probably additional "
  29. "platforms."
  30. msgstr "このモジュールは、PythonでBSD *ソケット(socket)* インターフェースを利用するために使用します。最近のUnixシステム、Windows, Max OS X, BeOS, OS/2など、多くのプラットフォームで利用可能です。"
  31. # 718a821c9d5f40348031abc067c5616c
  32. #: ../../library/socket.rst:14
  33. msgid ""
  34. "Some behavior may be platform dependent, since calls are made to the "
  35. "operating system socket APIs."
  36. msgstr "いくつかの振る舞いはプラットフォームに依存します。オペレーティングシステムのソケットAPIを呼び出しているためです。"
  37. # ca7b34c1b7d240388581b066ca7b1a48
  38. #: ../../library/socket.rst:19
  39. msgid ""
  40. "The Python interface is a straightforward transliteration of the Unix system"
  41. " call and library interface for sockets to Python's object-oriented style: "
  42. "the :func:`.socket` function returns a :dfn:`socket object` whose methods "
  43. "implement the various socket system calls. Parameter types are somewhat "
  44. "higher-level than in the C interface: as with :meth:`read` and :meth:`write`"
  45. " operations on Python files, buffer allocation on receive operations is "
  46. "automatic, and buffer length is implicit on send operations."
  47. msgstr ""
  48. # e0c20439c0164148aad4d48a4ca7d254
  49. #: ../../library/socket.rst:31
  50. msgid "Module :mod:`socketserver`"
  51. msgstr ""
  52. # efec016c2eff4baab798422bb99ef14a
  53. #: ../../library/socket.rst:31
  54. msgid "Classes that simplify writing network servers."
  55. msgstr "ネットワークサーバの開発を省力化するためのクラス群。"
  56. # 989e5cb4de5e4315a9114f887158f0c1
  57. #: ../../library/socket.rst:33
  58. msgid "Module :mod:`ssl`"
  59. msgstr ""
  60. # 6c189024ffc94750bf12dc9d670119e3
  61. #: ../../library/socket.rst:34
  62. msgid "A TLS/SSL wrapper for socket objects."
  63. msgstr "ソケットオブジェクトに対する TLS/SSL ラッパー."
  64. # 00a4d609e3e8483da087b231047ed51c
  65. #: ../../library/socket.rst:38
  66. msgid "Socket families"
  67. msgstr "ソケットファミリー"
  68. # 08f038c8dba14eedb2fcebc97d071090
  69. #: ../../library/socket.rst:40
  70. msgid ""
  71. "Depending on the system and the build options, various socket families are "
  72. "supported by this module."
  73. msgstr "どのシステムで実行するかとビルドオプションに依存しますが、このモジュールによって多様なソケットファミリーをサポートします。"
  74. # 6addf586f996425cb91b8dea853c5e7c
  75. #: ../../library/socket.rst:43
  76. msgid ""
  77. "The address format required by a particular socket object is automatically "
  78. "selected based on the address family specified when the socket object was "
  79. "created. Socket addresses are represented as follows:"
  80. msgstr "特定のソケットオブジェクトによってはアドレスフォーマットが必要とされますがソケットオブジェクトが生成されたときに指定されたアドレスファミリーを元に自動的に選択します。ソケットアドレスについては次の通りです:"
  81. # 3fa272622cd04224a788ad32e0fc01c6
  82. #: ../../library/socket.rst:47
  83. msgid ""
  84. "The address of an :const:`AF_UNIX` socket bound to a file system node is "
  85. "represented as a string, using the file system encoding and the "
  86. "``'surrogateescape'`` error handler (see :pep:`383`). An address in Linux's"
  87. " abstract namespace is returned as a :class:`bytes` object with an initial "
  88. "null byte; note that sockets in this namespace can communicate with normal "
  89. "file system sockets, so programs intended to run on Linux may need to deal "
  90. "with both types of address. A string or :class:`bytes` object can be used "
  91. "for either type of address when passing it as an argument."
  92. msgstr ""
  93. # 9839710817f94ceaaac5863b76436945
  94. # 7bd17ebd489b4cfa9d6c02a271ba933e
  95. #: ../../library/socket.rst:57 ../../library/socket.rst:57
  96. msgid ""
  97. "Previously, :const:`AF_UNIX` socket paths were assumed to use UTF-8 "
  98. "encoding."
  99. msgstr ""
  100. # aec6ff2faa6e469cb726b7391dbb22b1
  101. #: ../../library/socket.rst:61
  102. msgid ""
  103. "A pair ``(host, port)`` is used for the :const:`AF_INET` address family, "
  104. "where *host* is a string representing either a hostname in Internet domain "
  105. "notation like ``'daring.cwi.nl'`` or an IPv4 address like "
  106. "``'100.50.200.5'``, and *port* is an integer."
  107. msgstr ""
  108. # 8b2cdc7122d04792a16dffe89c0077b8
  109. #: ../../library/socket.rst:66
  110. msgid ""
  111. "For :const:`AF_INET6` address family, a four-tuple ``(host, port, flowinfo, "
  112. "scopeid)`` is used, where *flowinfo* and *scopeid* represent the "
  113. "``sin6_flowinfo`` and ``sin6_scope_id`` members in :const:`struct "
  114. "sockaddr_in6` in C. For :mod:`socket` module methods, *flowinfo* and "
  115. "*scopeid* can be omitted just for backward compatibility. Note, however, "
  116. "omission of *scopeid* can cause problems in manipulating scoped IPv6 "
  117. "addresses."
  118. msgstr ""
  119. # 0e2a1a9ff3f94bc184e4dd65ce0a0cf4
  120. #: ../../library/socket.rst:73
  121. msgid ""
  122. ":const:`AF_NETLINK` sockets are represented as pairs ``(pid, groups)``."
  123. msgstr ""
  124. # 5d42958d185e4699a2671ea9865f37ed
  125. #: ../../library/socket.rst:75
  126. msgid ""
  127. "Linux-only support for TIPC is available using the :const:`AF_TIPC` address "
  128. "family. TIPC is an open, non-IP based networked protocol designed for use "
  129. "in clustered computer environments. Addresses are represented by a tuple, "
  130. "and the fields depend on the address type. The general tuple form is "
  131. "``(addr_type, v1, v2, v3 [, scope])``, where:"
  132. msgstr ""
  133. # ed9834ecf78143d0bfccee3128289a04
  134. #: ../../library/socket.rst:81
  135. msgid ""
  136. "*addr_type* is one of :const:`TIPC_ADDR_NAMESEQ`, :const:`TIPC_ADDR_NAME`, "
  137. "or :const:`TIPC_ADDR_ID`."
  138. msgstr ""
  139. # 839d171395dd4e5abec7fa7d19f06416
  140. #: ../../library/socket.rst:83
  141. msgid ""
  142. "*scope* is one of :const:`TIPC_ZONE_SCOPE`, :const:`TIPC_CLUSTER_SCOPE`, and"
  143. " :const:`TIPC_NODE_SCOPE`."
  144. msgstr ""
  145. # 7957cc3c432345f18edd34a599d7ccba
  146. #: ../../library/socket.rst:85
  147. msgid ""
  148. "If *addr_type* is :const:`TIPC_ADDR_NAME`, then *v1* is the server type, "
  149. "*v2* is the port identifier, and *v3* should be 0."
  150. msgstr ""
  151. # c903c568e4c743a18376a595f02ada26
  152. #: ../../library/socket.rst:88
  153. msgid ""
  154. "If *addr_type* is :const:`TIPC_ADDR_NAMESEQ`, then *v1* is the server type, "
  155. "*v2* is the lower port number, and *v3* is the upper port number."
  156. msgstr ""
  157. # 66c93722656749978b3884ced870def9
  158. # 3d8854372122489aa178015476388c81
  159. #: ../../library/socket.rst:91 ../../library/socket.rst:94
  160. msgid ""
  161. "If *addr_type* is :const:`TIPC_ADDR_ID`, then *v1* is the node, *v2* is the "
  162. "reference, and *v3* should be set to 0."
  163. msgstr ""
  164. # 866f02d98b2d4b86ab8c25706897e5af
  165. #: ../../library/socket.rst:97
  166. msgid ""
  167. "A tuple ``(interface, )`` is used for the :const:`AF_CAN` address family, "
  168. "where *interface* is a string representing a network interface name like "
  169. "``'can0'``. The network interface name ``''`` can be used to receive packets"
  170. " from all network interfaces of this family."
  171. msgstr ""
  172. # fc3c4663cfb9404eabf6c14fe10f8a5b
  173. #: ../../library/socket.rst:102
  174. msgid ""
  175. "A string or a tuple ``(id, unit)`` is used for the :const:`SYSPROTO_CONTROL`"
  176. " protocol of the :const:`PF_SYSTEM` family. The string is the name of a "
  177. "kernel control using a dynamically-assigned ID. The tuple can be used if ID "
  178. "and unit number of the kernel control are known or if a registered ID is "
  179. "used."
  180. msgstr ""
  181. # 2479e37fd40c408e969e04c6e8e8a6d3
  182. #: ../../library/socket.rst:110
  183. msgid ""
  184. "Certain other address families (:const:`AF_BLUETOOTH`, :const:`AF_PACKET`) "
  185. "support specific representations."
  186. msgstr ""
  187. # 3226490d328442d98e294780fdb05429
  188. #: ../../library/socket.rst:115
  189. msgid ""
  190. "For IPv4 addresses, two special forms are accepted instead of a host "
  191. "address: the empty string represents :const:`INADDR_ANY`, and the string "
  192. "``'<broadcast>'`` represents :const:`INADDR_BROADCAST`. This behavior is "
  193. "not compatible with IPv6, therefore, you may want to avoid these if you "
  194. "intend to support IPv6 with your Python programs."
  195. msgstr ""
  196. # 0f932973a17e4bafbb65b8560c23553d
  197. #: ../../library/socket.rst:121
  198. msgid ""
  199. "If you use a hostname in the *host* portion of IPv4/v6 socket address, the "
  200. "program may show a nondeterministic behavior, as Python uses the first "
  201. "address returned from the DNS resolution. The socket address will be "
  202. "resolved differently into an actual IPv4/v6 address, depending on the "
  203. "results from DNS resolution and/or the host configuration. For "
  204. "deterministic behavior use a numeric address in *host* portion."
  205. msgstr "IPv4/v6ソケットの *host* 部にホスト名を指定すると、処理結果が一定ではない場合があります。これはPythonはDNSから取得したアドレスのうち最初のアドレスを使用するので、 DNSの処理やホストの設定によって異なるIPv4/6アドレスを取得する場合があるためです。常に同じ結果が必要であれば、 *host* に数値のアドレスを指定してください。"
  206. # 5f5a26b7db4a488d8b94af1ba28b351d
  207. #: ../../library/socket.rst:128
  208. msgid ""
  209. "All errors raise exceptions. The normal exceptions for invalid argument "
  210. "types and out-of-memory conditions can be raised; starting from Python 3.3, "
  211. "errors related to socket or address semantics raise :exc:`OSError` or one of"
  212. " its subclasses (they used to raise :exc:`socket.error`)."
  213. msgstr ""
  214. # c95723e1a2b44d98b69d8d89a621cb21
  215. #: ../../library/socket.rst:133
  216. msgid ""
  217. "Non-blocking mode is supported through :meth:`~socket.setblocking`. A "
  218. "generalization of this based on timeouts is supported through "
  219. ":meth:`~socket.settimeout`."
  220. msgstr ":meth:`~socket.setblocking` メソッドで、非ブロッキングモードを使用することができます。また、より汎用的に :meth:`~socket.settimeout` メソッドでタイムアウトを指定する事ができます。"
  221. # c774f0944c484502bf96c2b5ce07ce68
  222. #: ../../library/socket.rst:139
  223. msgid "Module contents"
  224. msgstr "モジュールの内容"
  225. # 7cd19c82a9bb4fe2bd40d368acf19240
  226. #: ../../library/socket.rst:141
  227. msgid "The module :mod:`socket` exports the following elements."
  228. msgstr ""
  229. # 794c39a39a3941119d1c606ae090be58
  230. #: ../../library/socket.rst:145
  231. msgid "Exceptions"
  232. msgstr "例外"
  233. # c3194afd41c8423bb4d47c74ab0ba35d
  234. #: ../../library/socket.rst:149
  235. msgid "A deprecated alias of :exc:`OSError`."
  236. msgstr ""
  237. # ef4928f7db6c41e78c390b16f15e07a7
  238. # 71118ae47376428ea68fb8120ad9b859
  239. #: ../../library/socket.rst:151 ../../library/socket.rst:151
  240. msgid "Following :pep:`3151`, this class was made an alias of :exc:`OSError`."
  241. msgstr ""
  242. # 3923e5f10d4749e2a7acc71ad543d14a
  243. #: ../../library/socket.rst:157
  244. msgid ""
  245. "A subclass of :exc:`OSError`, this exception is raised for address-related "
  246. "errors, i.e. for functions that use *h_errno* in the POSIX C API, including "
  247. ":func:`gethostbyname_ex` and :func:`gethostbyaddr`. The accompanying value "
  248. "is a pair ``(h_errno, string)`` representing an error returned by a library "
  249. "call. *h_errno* is a numeric value, while *string* represents the "
  250. "description of *h_errno*, as returned by the :c:func:`hstrerror` C function."
  251. msgstr ""
  252. # 4d701008711d49ed86e19fc540460417
  253. # d1ec22a46ee243f9b8111d39c3c1d43e
  254. # e2650f492cb14c8b84978b65ae8f7612
  255. # 0400c4612d67460ab25c7ae831d3aea9
  256. # d8fb49a1279e46f3855348b4ff60dea4
  257. # 02b3273a18384a169b13238f572826cf
  258. #: ../../library/socket.rst:165 ../../library/socket.rst:165
  259. #: ../../library/socket.rst:178 ../../library/socket.rst:178
  260. #: ../../library/socket.rst:189 ../../library/socket.rst:189
  261. msgid "This class was made a subclass of :exc:`OSError`."
  262. msgstr ""
  263. # b0d65754dfcc40c3b80ddb05161881db
  264. #: ../../library/socket.rst:170
  265. msgid ""
  266. "A subclass of :exc:`OSError`, this exception is raised for address-related "
  267. "errors by :func:`getaddrinfo` and :func:`getnameinfo`. The accompanying "
  268. "value is a pair ``(error, string)`` representing an error returned by a "
  269. "library call. *string* represents the description of *error*, as returned "
  270. "by the :c:func:`gai_strerror` C function. The numeric *error* value will "
  271. "match one of the :const:`EAI_\\*` constants defined in this module."
  272. msgstr ""
  273. # 1b58db6b4f21479aa49e62800ec4be1c
  274. #: ../../library/socket.rst:183
  275. msgid ""
  276. "A subclass of :exc:`OSError`, this exception is raised when a timeout occurs"
  277. " on a socket which has had timeouts enabled via a prior call to "
  278. ":meth:`~socket.settimeout` (or implicitly through "
  279. ":func:`~socket.setdefaulttimeout`). The accompanying value is a string "
  280. "whose value is currently always \"timed out\"."
  281. msgstr ""
  282. # 35283adb7130476e834a20e97ad0da33
  283. #: ../../library/socket.rst:194
  284. msgid "Constants"
  285. msgstr "定数"
  286. # b0a4f1d27da446b48f1fcea348ecbf78
  287. #: ../../library/socket.rst:200
  288. msgid ""
  289. "These constants represent the address (and protocol) families, used for the "
  290. "first argument to :func:`.socket`. If the :const:`AF_UNIX` constant is not "
  291. "defined then this protocol is unsupported. More constants may be available "
  292. "depending on the system."
  293. msgstr ""
  294. # 3e241f0c8fdd4c2bad50d8974eb4a4df
  295. #: ../../library/socket.rst:212
  296. msgid ""
  297. "These constants represent the socket types, used for the second argument to "
  298. ":func:`.socket`. More constants may be available depending on the system. "
  299. "(Only :const:`SOCK_STREAM` and :const:`SOCK_DGRAM` appear to be generally "
  300. "useful.)"
  301. msgstr ""
  302. # d03f8b97cc2c4fb6ba04feef70ccfe61
  303. #: ../../library/socket.rst:220
  304. msgid ""
  305. "These two constants, if defined, can be combined with the socket types and "
  306. "allow you to set some flags atomically (thus avoiding possible race "
  307. "conditions and the need for separate calls)."
  308. msgstr ""
  309. # 3e4f897695cb44978c610ec567f67005
  310. #: ../../library/socket.rst:226
  311. msgid ""
  312. "`Secure File Descriptor Handling "
  313. "<http://udrepper.livejournal.com/20407.html>`_ for a more thorough "
  314. "explanation."
  315. msgstr ""
  316. # 0666bebc969947ac8b299f164398a3c6
  317. #: ../../library/socket.rst:229
  318. msgid "Availability: Linux >= 2.6.27."
  319. msgstr ""
  320. # 9cf14a3caa5c48d3b25208f963ed065a
  321. #: ../../library/socket.rst:248
  322. msgid ""
  323. "Many constants of these forms, documented in the Unix documentation on "
  324. "sockets and/or the IP protocol, are also defined in the socket module. They "
  325. "are generally used in arguments to the :meth:`setsockopt` and "
  326. ":meth:`getsockopt` methods of socket objects. In most cases, only those "
  327. "symbols that are defined in the Unix header files are defined; for a few "
  328. "symbols, default values are provided."
  329. msgstr "Unixのソケット・IPプロトコルのドキュメントで定義されている各種定数。ソケットオブジェクトの :meth:`setsockopt` や :meth:`getsockopt` で使用します。ほとんどのシンボルはUnixのヘッダファイルに従っています。一部のシンボルには、デフォルト値を定義してあります。"
  330. # a8b7601b2a574d7ba229aa1ca6215fc0
  331. # eb8f2abf858f49178a923f807b693c76
  332. #: ../../library/socket.rst:260 ../../library/socket.rst:273
  333. msgid ""
  334. "Many constants of these forms, documented in the Linux documentation, are "
  335. "also defined in the socket module."
  336. msgstr ""
  337. # 4d0156314e434366bb56040b9bc9f745
  338. #: ../../library/socket.rst:263
  339. msgid "Availability: Linux >= 2.6.25."
  340. msgstr ""
  341. # 67717c2e6b6d4b038be2b9a11d90cd81
  342. #: ../../library/socket.rst:276
  343. msgid "Availability: Linux >= 2.6.30."
  344. msgstr ""
  345. # 5331acc939604d8e90d4581ef08eebe7
  346. #: ../../library/socket.rst:284
  347. msgid ""
  348. "Constants for Windows' WSAIoctl(). The constants are used as arguments to "
  349. "the :meth:`~socket.socket.ioctl` method of socket objects."
  350. msgstr ""
  351. # 616e56fdfc4b4448becdf7a72750d6b8
  352. #: ../../library/socket.rst:290
  353. msgid ""
  354. "TIPC related constants, matching the ones exported by the C socket API. See "
  355. "the TIPC documentation for more information."
  356. msgstr "TIPC関連の定数で、CのソケットAPIが公開しているものにマッチします。詳しい情報はTIPCのドキュメントを参照してください。"
  357. # 25af97962a14423a9892e71de631222f
  358. #: ../../library/socket.rst:296
  359. msgid ""
  360. "This constant contains a boolean value which indicates if IPv6 is supported "
  361. "on this platform."
  362. msgstr "現在のプラットフォームでIPv6がサポートされているか否かを示す真偽値。"
  363. # 362a45435dec4d58bd5fea524321365c
  364. #: ../../library/socket.rst:301
  365. msgid "Functions"
  366. msgstr "関数"
  367. # 835ebd3f13df480f89912e958e4d7d81
  368. #: ../../library/socket.rst:304
  369. msgid "Creating sockets"
  370. msgstr ""
  371. # 753ee6a7680b4931ae38bc074cb63167
  372. #: ../../library/socket.rst:306
  373. msgid ""
  374. "The following functions all create :ref:`socket objects <socket-objects>`."
  375. msgstr ""
  376. # 01fd05421dde4008ad2fbe3acd359b22
  377. #: ../../library/socket.rst:311
  378. msgid ""
  379. "Create a new socket using the given address family, socket type and protocol"
  380. " number. The address family should be :const:`AF_INET` (the default), "
  381. ":const:`AF_INET6`, :const:`AF_UNIX`, :const:`AF_CAN` or :const:`AF_RDS`. The"
  382. " socket type should be :const:`SOCK_STREAM` (the default), "
  383. ":const:`SOCK_DGRAM`, :const:`SOCK_RAW` or perhaps one of the other ``SOCK_``"
  384. " constants. The protocol number is usually zero and may be omitted in that "
  385. "case or :const:`CAN_RAW` in case the address family is :const:`AF_CAN`."
  386. msgstr ""
  387. # 3401694d32bb4f9081d0274ac0c79ac1
  388. # c27cbef8d1094640ac3057b51518b17f
  389. #: ../../library/socket.rst:319 ../../library/socket.rst:319
  390. msgid "The AF_CAN family was added. The AF_RDS family was added."
  391. msgstr ""
  392. # 152d725f41544ad6ad60b98bc9b546c3
  393. #: ../../library/socket.rst:326
  394. msgid ""
  395. "Build a pair of connected socket objects using the given address family, "
  396. "socket type, and protocol number. Address family, socket type, and protocol"
  397. " number are as for the :func:`.socket` function above. The default family is"
  398. " :const:`AF_UNIX` if defined on the platform; otherwise, the default is "
  399. ":const:`AF_INET`. Availability: Unix."
  400. msgstr ""
  401. # f043ae2a027d42348c1cf94a789360d1
  402. # 29e4cd5fc3f14c4482de1c86601cbcf3
  403. #: ../../library/socket.rst:332 ../../library/socket.rst:332
  404. msgid ""
  405. "The returned socket objects now support the whole socket API, rather than a "
  406. "subset."
  407. msgstr ""
  408. # 449eb6e3756e4738b87c8cbf7e881f9a
  409. #: ../../library/socket.rst:339
  410. msgid ""
  411. "Connect to a TCP service listening on the Internet *address* (a 2-tuple "
  412. "``(host, port)``), and return the socket object. This is a higher-level "
  413. "function than :meth:`socket.connect`: if *host* is a non-numeric hostname, "
  414. "it will try to resolve it for both :data:`AF_INET` and :data:`AF_INET6`, and"
  415. " then try to connect to all possible addresses in turn until a connection "
  416. "succeeds. This makes it easy to write clients that are compatible to both "
  417. "IPv4 and IPv6."
  418. msgstr ""
  419. # cdb44a8c3cdf4796a12d7b3d187a6eb3
  420. #: ../../library/socket.rst:347
  421. msgid ""
  422. "Passing the optional *timeout* parameter will set the timeout on the socket "
  423. "instance before attempting to connect. If no *timeout* is supplied, the "
  424. "global default timeout setting returned by :func:`getdefaulttimeout` is "
  425. "used."
  426. msgstr ""
  427. # dc53c6683e1d4da78e5f7fc3743a78a2
  428. #: ../../library/socket.rst:352
  429. msgid ""
  430. "If supplied, *source_address* must be a 2-tuple ``(host, port)`` for the "
  431. "socket to bind to as its source address before connecting. If host or port "
  432. "are '' or 0 respectively the OS default behavior will be used."
  433. msgstr "*source_address* は接続する前にバインドするソースアドレスを指定するオプション引数で、指定する場合は ``(host, port)`` の2要素タプルでなければなりません。 host や port が '' か 0 だった場合は、OSのデフォルトの動作になります。"
  434. # cb83de96360d4e0c99b8102107afcc2d
  435. # 1819757f05474ac09855e9cd02b8979c
  436. #: ../../library/socket.rst:356 ../../library/socket.rst:356
  437. msgid "*source_address* was added."
  438. msgstr ""
  439. # 6c9d7f3f9ade4eeea80dfb149ee622b7
  440. # e130458cea094d21968dc29c97b1a85d
  441. #: ../../library/socket.rst:359 ../../library/socket.rst:359
  442. msgid "support for the :keyword:`with` statement was added."
  443. msgstr ""
  444. # d7d789a65eb54041bdbe10afdd39ee16
  445. #: ../../library/socket.rst:365
  446. msgid ""
  447. "Duplicate the file descriptor *fd* (an integer as returned by a file "
  448. "object's :meth:`fileno` method) and build a socket object from the result. "
  449. "Address family, socket type and protocol number are as for the "
  450. ":func:`.socket` function above. The file descriptor should refer to a "
  451. "socket, but this is not checked --- subsequent operations on the object may "
  452. "fail if the file descriptor is invalid. This function is rarely needed, but "
  453. "can be used to get or set socket options on a socket passed to a program as "
  454. "standard input or output (such as a server started by the Unix inet daemon)."
  455. " The socket is assumed to be in blocking mode."
  456. msgstr ""
  457. # ca61177b87d54d7793dfde97f4947a00
  458. #: ../../library/socket.rst:377
  459. msgid ""
  460. "Instantiate a socket from data obtained from the :meth:`socket.share` "
  461. "method. The socket is assumed to be in blocking mode."
  462. msgstr ""
  463. # 72a929a423ba4193aa0ab137386f501b
  464. # 9844d838e42046658498e904bd7478bb
  465. #: ../../library/socket.rst:380 ../../library/socket.rst:1138
  466. msgid "Availability: Windows."
  467. msgstr "利用できる環境: Windows。"
  468. # a4955338259c4563b747e62cf5dbb64c
  469. #: ../../library/socket.rst:387
  470. msgid ""
  471. "This is a Python type object that represents the socket object type. It is "
  472. "the same as ``type(socket(...))``."
  473. msgstr "ソケットオブジェクトの型を示す型オブジェクト。 ``type(socket(...))`` と同じです。"
  474. # dbaa8586481843c79efac190a41e8fcd
  475. #: ../../library/socket.rst:392
  476. msgid "Other functions"
  477. msgstr "その他の関数"
  478. # 64e4d449642c45e991258e31301ccd9f
  479. #: ../../library/socket.rst:394
  480. msgid "The :mod:`socket` module also offers various network-related services:"
  481. msgstr ""
  482. # da95fc2fbc8f4abab60e3b277feef5cd
  483. #: ../../library/socket.rst:399
  484. msgid ""
  485. "Translate the *host*/*port* argument into a sequence of 5-tuples that "
  486. "contain all the necessary arguments for creating a socket connected to that "
  487. "service. *host* is a domain name, a string representation of an IPv4/v6 "
  488. "address or ``None``. *port* is a string service name such as ``'http'``, a "
  489. "numeric port number or ``None``. By passing ``None`` as the value of *host*"
  490. " and *port*, you can pass ``NULL`` to the underlying C API."
  491. msgstr "*host* / *port* 引数の指すアドレス情報を、そのサービスに接続されたソケットを作成するために必要な全ての引数が入った 5 要素のタプルに変換します。 *host* はドメイン名、IPv4/v6アドレスの文字列、または ``None`` です。 *port* は ``'http'`` のようなサービス名文字列、ポート番号を表す数値、または ``None`` です。 *host* と *port* に ``None`` を指定すると C APIに ``NULL`` を渡せます。"
  492. # 489143df472e4e859ef3ab7f529b9a80
  493. #: ../../library/socket.rst:406
  494. msgid ""
  495. "The *family*, *type* and *proto* arguments can be optionally specified in "
  496. "order to narrow the list of addresses returned. Passing zero as a value for"
  497. " each of these arguments selects the full range of results. The *flags* "
  498. "argument can be one or several of the ``AI_*`` constants, and will influence"
  499. " how results are computed and returned. For example, :const:`AI_NUMERICHOST`"
  500. " will disable domain name resolution and will raise an error if *host* is a "
  501. "domain name."
  502. msgstr "オプションの *family* 、 *type* 、 *proto* 引数を指定すると、返されるアドレスのリストを絞り込むことができます。これらの引数の値として 0 を渡すと絞る込まない結果を返します。 *flags* 引数には ``AI_*`` 定数のうち 1 つ以上が指定でき、結果の取り方を変えることができます。例えば、 :const:`AI_NUMERICHOST` を指定するとドメイン名解決を行わないようにし、 *host* がドメイン名だった場合には例外を送出します。"
  503. # d1e76ee0fdc14e21b0a6820244e4d0ac
  504. #: ../../library/socket.rst:414
  505. msgid "The function returns a list of 5-tuples with the following structure:"
  506. msgstr "この関数は以下の構造をとる 5 要素のタプルのリストを返します:"
  507. # c2118a5739b04e3d9e89ffdf933f848c
  508. #: ../../library/socket.rst:416
  509. msgid "``(family, type, proto, canonname, sockaddr)``"
  510. msgstr "``(family, type, proto, canonname, sockaddr)``"
  511. # 7febe568470a4942a2c2dd356940b655
  512. #: ../../library/socket.rst:418
  513. msgid ""
  514. "In these tuples, *family*, *type*, *proto* are all integers and are meant to"
  515. " be passed to the :func:`.socket` function. *canonname* will be a string "
  516. "representing the canonical name of the *host* if :const:`AI_CANONNAME` is "
  517. "part of the *flags* argument; else *canonname* will be empty. *sockaddr* is"
  518. " a tuple describing a socket address, whose format depends on the returned "
  519. "*family* (a ``(address, port)`` 2-tuple for :const:`AF_INET`, a ``(address, "
  520. "port, flow info, scope id)`` 4-tuple for :const:`AF_INET6`), and is meant to"
  521. " be passed to the :meth:`socket.connect` method."
  522. msgstr ""
  523. # be7b0aa0798b4b8da184a7cf9f72232b
  524. #: ../../library/socket.rst:428
  525. msgid ""
  526. "The following example fetches address information for a hypothetical TCP "
  527. "connection to ``www.python.org`` on port 80 (results may differ on your "
  528. "system if IPv6 isn't enabled)::"
  529. msgstr "次の例では ``www.python.org`` の 80 番ポートポートへの TCP 接続を得るためのアドレス情報を取得しようとしています。 (結果は IPv6 をサポートしているかどうかで変わります)::"
  530. # cb89a38f99fc410d9b8ef7ba3842faf1
  531. # ec16915d80054df3a9785e36eea0046d
  532. #: ../../library/socket.rst:436 ../../library/socket.rst:436
  533. msgid "parameters can now be passed as single keyword arguments."
  534. msgstr ""
  535. # 53615f9f9a514d4e91a5a6c4d85de182
  536. #: ../../library/socket.rst:441
  537. msgid ""
  538. "Return a fully qualified domain name for *name*. If *name* is omitted or "
  539. "empty, it is interpreted as the local host. To find the fully qualified "
  540. "name, the hostname returned by :func:`gethostbyaddr` is checked, followed by"
  541. " aliases for the host, if available. The first name which includes a period"
  542. " is selected. In case no fully qualified domain name is available, the "
  543. "hostname as returned by :func:`gethostname` is returned."
  544. msgstr "*name* の完全修飾ドメイン名を返します。 *name* が空または省略された場合、ローカルホストを指定したとみなします。完全修飾ドメイン名の取得にはまず :func:`gethostbyaddr` でチェックし、次に可能であればエイリアスを調べ、名前にピリオドを含む最初の名前を値として返します。完全修飾ドメイン名を取得できない場合、 :func:`gethostname` で返されるホスト名を返します。"
  545. # 0eeaa94d5dd549d0b8488287730b7a36
  546. #: ../../library/socket.rst:451
  547. msgid ""
  548. "Translate a host name to IPv4 address format. The IPv4 address is returned "
  549. "as a string, such as ``'100.50.200.5'``. If the host name is an IPv4 "
  550. "address itself it is returned unchanged. See :func:`gethostbyname_ex` for a"
  551. " more complete interface. :func:`gethostbyname` does not support IPv6 name "
  552. "resolution, and :func:`getaddrinfo` should be used instead for IPv4/v6 dual "
  553. "stack support."
  554. msgstr "ホスト名を ``'100.50.200.5'`` のようなIPv4形式のアドレスに変換します。ホスト名としてIPv4アドレスを指定した場合、その値は変換せずにそのまま返ります。 :func:`gethostbyname` APIへのより完全なインターフェースが必要であれば、 :func:`gethostbyname_ex` を参照してください。 :func:`gethostbyname` は、IPv6名前解決をサポートしていません。IPv4/ v6のデュアルスタックをサポートする場合は :func:`getaddrinfo` を使用します。"
  555. # dd655c91490845618bfe2a8a55e8b73d
  556. #: ../../library/socket.rst:460
  557. msgid ""
  558. "Translate a host name to IPv4 address format, extended interface. Return a "
  559. "triple ``(hostname, aliaslist, ipaddrlist)`` where *hostname* is the primary"
  560. " host name responding to the given *ip_address*, *aliaslist* is a (possibly "
  561. "empty) list of alternative host names for the same address, and *ipaddrlist*"
  562. " is a list of IPv4 addresses for the same interface on the same host (often "
  563. "but not always a single address). :func:`gethostbyname_ex` does not support "
  564. "IPv6 name resolution, and :func:`getaddrinfo` should be used instead for "
  565. "IPv4/v6 dual stack support."
  566. msgstr "ホスト名から、IPv4形式の各種アドレス情報を取得します。戻り値は ``(hostname, aliaslist, ipaddrlist)`` のタプルで、 *hostname* は *ip_address* で指定したホストの正式名、 *aliaslist* は同じアドレスの別名のリスト(空の場合もある)、 *ipaddrlist* は同じホスト上の同一インターフェースのIPv4アドレスのリスト(ほとんどの場合は単一のアドレスのみ) を示します。 :func:`gethostbyname` は、IPv6名前解決をサポートしていません。IPv4/v6のデュアルスタックをサポートする場合は :func:`getaddrinfo` を使用します。"
  567. # 73e962c3b8a84a1483e8c26d4e210862
  568. #: ../../library/socket.rst:472
  569. msgid ""
  570. "Return a string containing the hostname of the machine where the Python "
  571. "interpreter is currently executing."
  572. msgstr "Pythonインタープリタを現在実行中のマシンのホスト名を示す文字列を取得します。"
  573. # f9b3d54e89994c15b1eef44bf705b4ba
  574. #: ../../library/socket.rst:475
  575. msgid ""
  576. "If you want to know the current machine's IP address, you may want to use "
  577. "``gethostbyname(gethostname())``. This operation assumes that there is a "
  578. "valid address-to-host mapping for the host, and the assumption does not "
  579. "always hold."
  580. msgstr "実行中マシンのIPアドレスが必要であれば、 ``gethostbyname(gethostname())`` を使用してください。この処理は実行中ホストのアドレス-ホスト名変換が可能であることを前提としていますが、常に変換可能であるとは限りません。"
  581. # 4ba246d1f849474d86bc633a1da6264e
  582. #: ../../library/socket.rst:480
  583. msgid ""
  584. "Note: :func:`gethostname` doesn't always return the fully qualified domain "
  585. "name; use ``getfqdn()`` (see above)."
  586. msgstr "注意: :func:`gethostname` は完全修飾ドメイン名を返すとは限りません。完全修飾ドメイン名が必要であれば、 ``gethostbyaddr(gethostname())`` としてください(下記参照)。"
  587. # cc34823a4f2d4e3284258a2109c11cac
  588. #: ../../library/socket.rst:486
  589. msgid ""
  590. "Return a triple ``(hostname, aliaslist, ipaddrlist)`` where *hostname* is "
  591. "the primary host name responding to the given *ip_address*, *aliaslist* is a"
  592. " (possibly empty) list of alternative host names for the same address, and "
  593. "*ipaddrlist* is a list of IPv4/v6 addresses for the same interface on the "
  594. "same host (most likely containing only a single address). To find the fully "
  595. "qualified domain name, use the function :func:`getfqdn`. "
  596. ":func:`gethostbyaddr` supports both IPv4 and IPv6."
  597. msgstr "``(hostname, aliaslist, ipaddrlist)`` のタプルを返し、 *hostname* は *ip_address* で指定したホストの正式名、 ``aliaslist`` は同じアドレスの別名のリスト(空の場合もある)、 ``ipaddrlist`` は同じホスト上の同一インターフェースのIPv4アドレスのリスト(ほとんどの場合は単一のアドレスのみ)を示します。完全修飾ドメイン名が必要であれば、 :func:`getfqdn` を使用してください。 :func:`gethostbyaddr` は、IPv4/IPv6の両方をサポートしています。"
  598. # 4be3c21ed1bf4d5faec1e42877dd9877
  599. #: ../../library/socket.rst:497
  600. msgid ""
  601. "Translate a socket address *sockaddr* into a 2-tuple ``(host, port)``. "
  602. "Depending on the settings of *flags*, the result can contain a fully-"
  603. "qualified domain name or numeric address representation in *host*. "
  604. "Similarly, *port* can contain a string port name or a numeric port number."
  605. msgstr "ソケットアドレス *sockaddr* から、 ``(host, port)`` のタプルを取得します。 *flags* の設定に従い、 *host* は完全修飾ドメイン名または数値形式アドレスとなります。同様に、 *port* は文字列のポート名または数値のポート番号となります。"
  606. # f2b5ad4679104aafb1abe480034a5ed3
  607. #: ../../library/socket.rst:505
  608. msgid ""
  609. "Translate an Internet protocol name (for example, ``'icmp'``) to a constant "
  610. "suitable for passing as the (optional) third argument to the :func:`.socket`"
  611. " function. This is usually only needed for sockets opened in \"raw\" mode "
  612. "(:const:`SOCK_RAW`); for the normal socket modes, the correct protocol is "
  613. "chosen automatically if the protocol is omitted or zero."
  614. msgstr ""
  615. # 39f75d9eb9264692918f671d6be390ec
  616. #: ../../library/socket.rst:514
  617. msgid ""
  618. "Translate an Internet service name and protocol name to a port number for "
  619. "that service. The optional protocol name, if given, should be ``'tcp'`` or "
  620. "``'udp'``, otherwise any protocol will match."
  621. msgstr "インターネットサービス名とプロトコルから、そのサービスのポート番号を取得します。省略可能なプロトコル名として、 ``'tcp'`` か ``'udp'`` のどちらかを指定することができます。指定がなければどちらのプロトコルにもマッチします。"
  622. # dfa9f40b690d43d28e0e8c17f46d558d
  623. #: ../../library/socket.rst:521
  624. msgid ""
  625. "Translate an Internet port number and protocol name to a service name for "
  626. "that service. The optional protocol name, if given, should be ``'tcp'`` or "
  627. "``'udp'``, otherwise any protocol will match."
  628. msgstr "インターネットポート番号とプロトコル名から、サービス名を取得します。省略可能なプロトコル名として、 ``'tcp'`` か ``'udp'`` のどちらかを指定することができます。指定がなければどちらのプロトコルにもマッチします。"
  629. # 6feb402444d24f65abaaf1abffed0706
  630. #: ../../library/socket.rst:528
  631. msgid ""
  632. "Convert 32-bit positive integers from network to host byte order. On "
  633. "machines where the host byte order is the same as network byte order, this "
  634. "is a no-op; otherwise, it performs a 4-byte swap operation."
  635. msgstr "32ビットの正の整数のバイトオーダを、ネットワークバイトオーダからホストバイトオーダに変換します。ホストバイトオーダとネットワークバイトオーダが一致するマシンでは、この関数は何もしません。それ以外の場合は4バイトのスワップを行います。"
  636. # 51d2994311c940e98aff17b5e3eceb59
  637. #: ../../library/socket.rst:535
  638. msgid ""
  639. "Convert 16-bit positive integers from network to host byte order. On "
  640. "machines where the host byte order is the same as network byte order, this "
  641. "is a no-op; otherwise, it performs a 2-byte swap operation."
  642. msgstr "16ビットの正の整数のバイトオーダを、ネットワークバイトオーダからホストバイトオーダに変換します。ホストバイトオーダとネットワークバイトオーダが一致するマシンでは、この関数は何もしません。それ以外の場合は2バイトのスワップを行います。"
  643. # 02fc05e64a7a4e179f851a8cd5551949
  644. #: ../../library/socket.rst:542
  645. msgid ""
  646. "Convert 32-bit positive integers from host to network byte order. On "
  647. "machines where the host byte order is the same as network byte order, this "
  648. "is a no-op; otherwise, it performs a 4-byte swap operation."
  649. msgstr "32ビットの正の整数のバイトオーダを、ホストバイトオーダからネットワークバイトオーダに変換します。ホストバイトオーダとネットワークバイトオーダが一致するマシンでは、この関数は何もしません。それ以外の場合は4バイトのスワップを行います。"
  650. # 2da3fa52c4c844c8989fa36a226813cc
  651. #: ../../library/socket.rst:549
  652. msgid ""
  653. "Convert 16-bit positive integers from host to network byte order. On "
  654. "machines where the host byte order is the same as network byte order, this "
  655. "is a no-op; otherwise, it performs a 2-byte swap operation."
  656. msgstr "16ビットの正の整数のバイトオーダを、ホストバイトオーダからネットワークバイトオーダに変換します。ホストバイトオーダとネットワークバイトオーダが一致するマシンでは、この関数は何もしません。それ以外の場合は2バイトのスワップを行います。"
  657. # eb512910712e407581ddf05254dc1a6c
  658. #: ../../library/socket.rst:556
  659. msgid ""
  660. "Convert an IPv4 address from dotted-quad string format (for example, "
  661. "'123.45.67.89') to 32-bit packed binary format, as a bytes object four "
  662. "characters in length. This is useful when conversing with a program that "
  663. "uses the standard C library and needs objects of type :c:type:`struct "
  664. "in_addr`, which is the C type for the 32-bit packed binary this function "
  665. "returns."
  666. msgstr "ドット記法によるIPv4アドレス(``'123.45.67.89'`` など)を32ビットにパックしたバイナリ形式に変換し、長さ4のバイト列オブジェクトとして返します。この関数が返す値は、標準Cライブラリの :c:type:`struct in_addr` 型を使用する関数に渡す事ができます。"
  667. # 77894199ecce4774b800266e819dcff8
  668. #: ../../library/socket.rst:562
  669. msgid ""
  670. ":func:`inet_aton` also accepts strings with less than three dots; see the "
  671. "Unix manual page :manpage:`inet(3)` for details."
  672. msgstr ":func:`inet_aton` はドットが 3 個以下の文字列も受け取ります; 詳細については Unix のマニュアル :manpage:`inet(3)` を参照してください。"
  673. # 13590d08f6b147a9b20216248d62e41b
  674. #: ../../library/socket.rst:565
  675. msgid ""
  676. "If the IPv4 address string passed to this function is invalid, "
  677. ":exc:`OSError` will be raised. Note that exactly what is valid depends on "
  678. "the underlying C implementation of :c:func:`inet_aton`."
  679. msgstr "IPv4アドレス文字列が不正であれば、 :exc:`OSError` が発生します。このチェックは、この関数で使用しているCの実装 :c:func:`inet_aton` で行われます。"
  680. # d7248f6947ed482b8f40956fd03f7bb0
  681. #: ../../library/socket.rst:569
  682. msgid ""
  683. ":func:`inet_aton` does not support IPv6, and :func:`inet_pton` should be "
  684. "used instead for IPv4/v6 dual stack support."
  685. msgstr ":func:`inet_aton` は、IPv6をサポートしません。IPv4/v6のデュアルスタックをサポートする場合は :func:`inet_pton` を使用します。"
  686. # 88f4e89caa4b4927af52a0c7cec1b204
  687. #: ../../library/socket.rst:575
  688. msgid ""
  689. "Convert a 32-bit packed IPv4 address (a bytes object four characters in "
  690. "length) to its standard dotted-quad string representation (for example, "
  691. "'123.45.67.89'). This is useful when conversing with a program that uses "
  692. "the standard C library and needs objects of type :c:type:`struct in_addr`, "
  693. "which is the C type for the 32-bit packed binary data this function takes as"
  694. " an argument."
  695. msgstr "32ビットにパックしたバイナリ形式のIPv4アドレスを、ドット記法による文字列 (``'123.45.67.89'`` など)に変換します。この関数が返す値は、標準Cライブラリの :c:type:`struct in_addr` 型を使用する関数に渡す事ができます。"
  696. # c7a0482928f04d11a6242e3cd1e59210
  697. #: ../../library/socket.rst:582
  698. msgid ""
  699. "If the byte sequence passed to this function is not exactly 4 bytes in "
  700. "length, :exc:`OSError` will be raised. :func:`inet_ntoa` does not support "
  701. "IPv6, and :func:`inet_ntop` should be used instead for IPv4/v6 dual stack "
  702. "support."
  703. msgstr "この関数に渡すバイトシーケンスの長さが4バイト以外であれば、 :exc:`socket.error` が発生します。 :func:`inet_ntoa` は、IPv6をサポートしません。IPv4/v6のデュアルスタックをサポートする場合は :func:`inet_pton` を使用します。"
  704. # 6a777f795b1b4bd7954cd86b699287f1
  705. #: ../../library/socket.rst:590
  706. msgid ""
  707. "Convert an IP address from its family-specific string format to a packed, "
  708. "binary format. :func:`inet_pton` is useful when a library or network "
  709. "protocol calls for an object of type :c:type:`struct in_addr` (similar to "
  710. ":func:`inet_aton`) or :c:type:`struct in6_addr`."
  711. msgstr "IPアドレスを、アドレスファミリ固有の文字列からパックしたバイナリ形式に変換します。 :func:`inet_pton` は、 :c:type:`struct in_addr` 型 (:func:`inet_aton` と同様)や :c:type:`struct in6_addr` を使用するライブラリやネットワークプロトコルを呼び出す際に使用することができます。"
  712. # 0c4640629bff48f09f1aa1ca94bf49de
  713. #: ../../library/socket.rst:595
  714. msgid ""
  715. "Supported values for *address_family* are currently :const:`AF_INET` and "
  716. ":const:`AF_INET6`. If the IP address string *ip_string* is invalid, "
  717. ":exc:`OSError` will be raised. Note that exactly what is valid depends on "
  718. "both the value of *address_family* and the underlying implementation of "
  719. ":c:func:`inet_pton`."
  720. msgstr "現在サポートされている *address_family* は、 :const:`AF_INET` と :const:`AF_INET6` です。 *ip_string* に不正なIPアドレス文字列を指定すると、 :exc:`OSError` が発生します。有効な *ip_string* は、 *address_family* と :c:func:`inet_pton` の実装によって異なります。"
  721. # f0882252f5a54686a324dba6a32541f9
  722. # 935f331356564bd5a2bbe00d93d55640
  723. #: ../../library/socket.rst:601 ../../library/socket.rst:617
  724. msgid "Availability: Unix (maybe not all platforms)."
  725. msgstr "利用可能: Unix (サポートしていないプラットフォームもあります)。"
  726. # 2f3ee5780b494362bbfcb75f7003955d
  727. #: ../../library/socket.rst:606
  728. msgid ""
  729. "Convert a packed IP address (a bytes object of some number of characters) to"
  730. " its standard, family-specific string representation (for example, "
  731. "``'7.10.0.5'`` or ``'5aef:2b::8'``). :func:`inet_ntop` is useful when a "
  732. "library or network protocol returns an object of type :c:type:`struct "
  733. "in_addr` (similar to :func:`inet_ntoa`) or :c:type:`struct in6_addr`."
  734. msgstr "パックしたIPアドレス(数文字のバイト列オブジェクト)を、 ``'7.10.0.5'`` や ``'5aef:2b::8'`` などの標準的な、アドレスファミリ固有の文字列形式に変換します。 :func:`inet_ntop` は(:func:`inet_ntoa` と同様に) :c:type:`struct in_addr` 型や :c:type:`struct in6_addr` 型のオブジェクトを返すライブラリやネットワークプロトコル等で使用することができます。"
  735. # 8241745c11774039a84ac2f1ccff07c3
  736. #: ../../library/socket.rst:612
  737. msgid ""
  738. "Supported values for *address_family* are currently :const:`AF_INET` and "
  739. ":const:`AF_INET6`. If the string *packed_ip* is not the correct length for "
  740. "the specified address family, :exc:`ValueError` will be raised. A "
  741. ":exc:`OSError` is raised for errors from the call to :func:`inet_ntop`."
  742. msgstr "現在サポートされている *address_family* は、 :const:`AF_INET` と :const:`AF_INET6` です。 *packed_ip* の長さが指定したアドレスファミリで適切な長さでなければ、 :exc:`ValueError` が発生します。 :func:`inet_ntop` でエラーとなると、 :exc:`OSError` が発生します。"
  743. # a6fe65cc7b674e579c4ed5dfe76e6f32
  744. #: ../../library/socket.rst:628
  745. msgid ""
  746. "Return the total length, without trailing padding, of an ancillary data item"
  747. " with associated data of the given *length*. This value can often be used "
  748. "as the buffer size for :meth:`~socket.recvmsg` to receive a single item of "
  749. "ancillary data, but :rfc:`3542` requires portable applications to use "
  750. ":func:`CMSG_SPACE` and thus include space for padding, even when the item "
  751. "will be the last in the buffer. Raises :exc:`OverflowError` if *length* is "
  752. "outside the permissible range of values."
  753. msgstr ""
  754. # dcda93aaf72f45678c4eda611aea023d
  755. # 92c323796ea94a588a30005d363bb08b
  756. # eb26b0bbf1d74685a8e1257cee7d0066
  757. # 0747488eeddd4554a4bf6417c57bb72b
  758. # 53eea693d11149469d5673a5fb8ce6c0
  759. #: ../../library/socket.rst:637 ../../library/socket.rst:658
  760. #: ../../library/socket.rst:959 ../../library/socket.rst:996
  761. #: ../../library/socket.rst:1080
  762. msgid "Availability: most Unix platforms, possibly others."
  763. msgstr ""
  764. # 0f01b2f732fe469a8b1ab634e996af97
  765. #: ../../library/socket.rst:644
  766. msgid ""
  767. "Return the buffer size needed for :meth:`~socket.recvmsg` to receive an "
  768. "ancillary data item with associated data of the given *length*, along with "
  769. "any trailing padding. The buffer space needed to receive multiple items is "
  770. "the sum of the :func:`CMSG_SPACE` values for their associated data lengths."
  771. " Raises :exc:`OverflowError` if *length* is outside the permissible range "
  772. "of values."
  773. msgstr ""
  774. # 79b7af29103f4afdb3e62d6818ad1e2d
  775. #: ../../library/socket.rst:652
  776. msgid ""
  777. "Note that some systems might support ancillary data without providing this "
  778. "function. Also note that setting the buffer size using the results of this "
  779. "function may not precisely limit the amount of ancillary data that can be "
  780. "received, since additional data may be able to fit into the padding area."
  781. msgstr ""
  782. # 7336abb70ff24b9091bf7758b23634d9
  783. #: ../../library/socket.rst:665
  784. msgid ""
  785. "Return the default timeout in seconds (float) for new socket objects. A "
  786. "value of ``None`` indicates that new socket objects have no timeout. When "
  787. "the socket module is first imported, the default is ``None``."
  788. msgstr "新規に生成されたソケットオブジェクトの、デフォルトのタイムアウト値を秒数(浮動小数点形式)で返します。タイプアウトを使用しない場合には ``None`` を返します。最初にsocketモジュールがインポートされた時の初期値は ``None`` です。"
  789. # 94e8cf3e042246f4a04f0d1456cfc3cd
  790. #: ../../library/socket.rst:672
  791. msgid ""
  792. "Set the default timeout in seconds (float) for new socket objects. When the"
  793. " socket module is first imported, the default is ``None``. See "
  794. ":meth:`~socket.settimeout` for possible values and their respective "
  795. "meanings."
  796. msgstr ""
  797. # 4244f00c68d746358130362fb9c7288b
  798. #: ../../library/socket.rst:680
  799. msgid ""
  800. "Set the machine's hostname to *name*. This will raise a :exc:`OSError` if "
  801. "you don't have enough rights."
  802. msgstr ""
  803. # 7ff272ba99f34ea7abe9a3ca38af8ef0
  804. # 9b5e7820356d43e39df8686108cceab4
  805. # 81051ee7ca9147c8a5598a69608a8ee0
  806. # ec27d109f63d43bfaea94f5ff4095dd2
  807. #: ../../library/socket.rst:683 ../../library/socket.rst:694
  808. #: ../../library/socket.rst:705 ../../library/socket.rst:716
  809. msgid "Availability: Unix."
  810. msgstr "利用できる環境: Unix。"
  811. # 499186d8a19e424196679c97e8332bd0
  812. #: ../../library/socket.rst:690
  813. msgid ""
  814. "Return a list of network interface information (index int, name string) "
  815. "tuples. :exc:`OSError` if the system call fails."
  816. msgstr ""
  817. # c4ebcac498a44d64a88b5ee61b65dae1
  818. #: ../../library/socket.rst:701
  819. msgid ""
  820. "Return a network interface index number corresponding to an interface name. "
  821. ":exc:`OSError` if no interface with the given name exists."
  822. msgstr ""
  823. # 8a227c2f2674493aa34f32046016bee1
  824. #: ../../library/socket.rst:712
  825. msgid ""
  826. "Return a network interface name corresponding to a interface index number. "
  827. ":exc:`OSError` if no interface with the given index exists."
  828. msgstr ""
  829. # 11b8514d5b9945a58292ba4d238f92da
  830. #: ../../library/socket.rst:724
  831. msgid "Socket Objects"
  832. msgstr "socket オブジェクト"
  833. # 313bd9e858854a2f9f183b8cf6f2b2b1
  834. #: ../../library/socket.rst:726
  835. msgid ""
  836. "Socket objects have the following methods. Except for "
  837. ":meth:`~socket.makefile`, these correspond to Unix system calls applicable "
  838. "to sockets."
  839. msgstr ""
  840. # 4030753db7f24dcfaa5c3f54d95b64e7
  841. #: ../../library/socket.rst:733
  842. msgid ""
  843. "Accept a connection. The socket must be bound to an address and listening "
  844. "for connections. The return value is a pair ``(conn, address)`` where *conn*"
  845. " is a *new* socket object usable to send and receive data on the connection,"
  846. " and *address* is the address bound to the socket on the other end of the "
  847. "connection."
  848. msgstr "接続を受け付けます。ソケットはアドレスにbind済みで、listen中である必要があります。戻り値は ``(conn, address)`` のペアで、 *conn* は接続を通じてデータの送受信を行うための *新しい* ソケットオブジェクト、 *address* は接続先でソケットにbindしているアドレスを示します。"
  849. # d64015cae7e2423d926ad0f54eb4e8e6
  850. #: ../../library/socket.rst:741
  851. msgid ""
  852. "Bind the socket to *address*. The socket must not already be bound. (The "
  853. "format of *address* depends on the address family --- see above.)"
  854. msgstr "ソケットを *address* にbindします。bind済みのソケットを再バインドする事はできません。 *address* のフォーマットはアドレスファミリによって異なります(前述)。"
  855. # 0af312f00fa14d46856f5f106c7fc889
  856. #: ../../library/socket.rst:747
  857. msgid ""
  858. "Mark the socket closed. The underlying system resource (e.g. a file "
  859. "descriptor) is also closed when all file objects from :meth:`makefile()` are"
  860. " closed. Once that happens, all future operations on the socket object will"
  861. " fail. The remote end will receive no more data (after queued data is "
  862. "flushed)."
  863. msgstr ""
  864. # c1dcb96692954d88af9f4164f5ab17dd
  865. #: ../../library/socket.rst:753
  866. msgid ""
  867. "Sockets are automatically closed when they are garbage-collected, but it is "
  868. "recommended to :meth:`close` them explicitly, or to use a :keyword:`with` "
  869. "statement around them."
  870. msgstr ""
  871. # 8e55a10cfc0b4eda9e15f598e2b071d8
  872. #: ../../library/socket.rst:758
  873. msgid ""
  874. ":meth:`close()` releases the resource associated with a connection but does "
  875. "not necessarily close the connection immediately. If you want to close the "
  876. "connection in a timely fashion, call :meth:`shutdown()` before "
  877. ":meth:`close()`."
  878. msgstr ""
  879. # 13f2a08413d14fe59c1f42cd9273eb48
  880. #: ../../library/socket.rst:766
  881. msgid ""
  882. "Connect to a remote socket at *address*. (The format of *address* depends on"
  883. " the address family --- see above.)"
  884. msgstr "*address* で示されるリモートソケットに接続します。 *address* のフォーマットはアドレスファミリによって異なります(前述)。"
  885. # 82a7a5b413ea4b0a97175133f1e3f216
  886. #: ../../library/socket.rst:772
  887. msgid ""
  888. "Like ``connect(address)``, but return an error indicator instead of raising "
  889. "an exception for errors returned by the C-level :c:func:`connect` call "
  890. "(other problems, such as \"host not found,\" can still raise exceptions). "
  891. "The error indicator is ``0`` if the operation succeeded, otherwise the value"
  892. " of the :c:data:`errno` variable. This is useful to support, for example, "
  893. "asynchronous connects."
  894. msgstr "``connect(address)`` と同様ですが、C言語の :c:func:`connect` 関数の呼び出しでエラーが発生した場合には例外を送出せずにエラーを戻り値として返します。(これ以外の、\"host not found,\"等のエラーの場合には例外が発生します。)処理が正常に終了した場合には ``0`` を返し、エラー時には :c:data:`errno` の値を返します。この関数は、非同期接続をサポートする場合などに使用することができます。"
  895. # ff02c80cdc4a4c95bee3265b763f0fff
  896. #: ../../library/socket.rst:782
  897. msgid ""
  898. "Put the socket object into closed state without actually closing the "
  899. "underlying file descriptor. The file descriptor is returned, and can be "
  900. "reused for other purposes."
  901. msgstr ""
  902. # 8b867688b5aa4a2c96070cf7f36b2c58
  903. #: ../../library/socket.rst:791
  904. msgid ""
  905. "Return the socket's file descriptor (a small integer). This is useful with "
  906. ":func:`select.select`."
  907. msgstr "ソケットのファイルディスクリプタを整数型で返します。ファイルディスクリプタは、 :func:`select.select` などで使用します。"
  908. # 2fe6d2fd6a08493c99a03a2ea0a88f75
  909. #: ../../library/socket.rst:794
  910. msgid ""
  911. "Under Windows the small integer returned by this method cannot be used where"
  912. " a file descriptor can be used (such as :func:`os.fdopen`). Unix does not "
  913. "have this limitation."
  914. msgstr "Windowsではこのメソッドで返された小整数をファイルディスクリプタを扱う箇所(:func:`os.fdopen` など)で利用できません。 Unix にはこの制限はありません。"
  915. # b9877063f0fb4d909eafa1ffae517edb
  916. #: ../../library/socket.rst:801
  917. msgid ""
  918. "Return the remote address to which the socket is connected. This is useful "
  919. "to find out the port number of a remote IPv4/v6 socket, for instance. (The "
  920. "format of the address returned depends on the address family --- see above.)"
  921. " On some systems this function is not supported."
  922. msgstr "ソケットが接続しているリモートアドレスを返します。この関数は、リモート IPv4/v6ソケットのポート番号を調べる場合などに使用します。 *address* のフォーマットはアドレスファミリによって異なります(前述)。この関数をサポートしていないシステムも存在します。"
  923. # 89287c66e835478180c05d27af2b68da
  924. #: ../../library/socket.rst:809
  925. msgid ""
  926. "Return the socket's own address. This is useful to find out the port number"
  927. " of an IPv4/v6 socket, for instance. (The format of the address returned "
  928. "depends on the address family --- see above.)"
  929. msgstr "ソケット自身のアドレスを返します。この関数は、IPv4/v6ソケットのポート番号を調べる場合などに使用します。 *address* のフォーマットはアドレスファミリによって異なります(前述)。"
  930. # 62d1a36b7cde46efb1cf2b29567f232b
  931. #: ../../library/socket.rst:816
  932. msgid ""
  933. "Return the value of the given socket option (see the Unix man page "
  934. ":manpage:`getsockopt(2)`). The needed symbolic constants (:const:`SO_\\*` "
  935. "etc.) are defined in this module. If *buflen* is absent, an integer option "
  936. "is assumed and its integer value is returned by the function. If *buflen* "
  937. "is present, it specifies the maximum length of the buffer used to receive "
  938. "the option in, and this buffer is returned as a bytes object. It is up to "
  939. "the caller to decode the contents of the buffer (see the optional built-in "
  940. "module :mod:`struct` for a way to decode C structures encoded as byte "
  941. "strings)."
  942. msgstr "ソケットに指定されたオプションを返します(Unixのマニュアルページ :manpage:`getsockopt(2)` を参照)。 :const:`SO_\\*` 等のシンボルは、このモジュールで定義しています。 *buflen* を省略した場合、取得するオブションは整数とみなし、整数型の値を戻り値とします。 *buflen* を指定した場合、長さ *buflen* のバッファでオプションを受け取り、このバッファをバイト列オブジェクトとして返します。このバッファは、呼び出し元プログラムで :mod:`struct` モジュール等を利用して内容を読み取ることができます。"
  943. # b8ec909496b94c138472500bc131d5ad
  944. #: ../../library/socket.rst:828
  945. msgid ""
  946. "Return the timeout in seconds (float) associated with socket operations, or "
  947. "``None`` if no timeout is set. This reflects the last call to "
  948. ":meth:`setblocking` or :meth:`settimeout`."
  949. msgstr ""
  950. # 41b163af889b42239d009ed83709675f
  951. #: ../../library/socket.rst:835
  952. msgid "Windows"
  953. msgstr "Windows"
  954. # 04d06913140945bd8d93157b0e7c3ccd
  955. #: ../../library/socket.rst:837
  956. msgid ""
  957. "The :meth:`ioctl` method is a limited interface to the WSAIoctl system "
  958. "interface. Please refer to the `Win32 documentation "
  959. "<http://msdn.microsoft.com/en-us/library/ms741621%28VS.85%29.aspx>`_ for "
  960. "more information."
  961. msgstr ":meth:`ioctl` メソッドは WSAIoctl システムインタフェースへの制限されたインタフェースです。詳しい情報については、 `Win32 documentation <http://msdn.microsoft.com/en-us/library/ms741621%28VS.85%29.aspx>`_ を参照してください。"
  962. # 7a70db30b7b9461688295ab94800240a
  963. #: ../../library/socket.rst:842
  964. msgid ""
  965. "On other platforms, the generic :func:`fcntl.fcntl` and :func:`fcntl.ioctl` "
  966. "functions may be used; they accept a socket object as their first argument."
  967. msgstr "他のプラットフォームでは一般的な :func:`fcntl.fcntl` と :func:`fcntl.ioctl` が使われるでしょう; これらの関数は第 1 引数としてソケットオブジェクトを取ります。"
  968. # d42450bce7844b2d94d4be07dab670fb
  969. #: ../../library/socket.rst:847
  970. msgid ""
  971. "Listen for connections made to the socket. The *backlog* argument specifies"
  972. " the maximum number of queued connections and should be at least 0; the "
  973. "maximum value is system-dependent (usually 5), the minimum value is forced "
  974. "to 0."
  975. msgstr "ソケットをListenし、接続を待ちます。引数 *backlog* には接続キューの最大の長さ(0以上)を指定します。 *backlog* の最大数はシステムに依存します (通常は5)。最小値は必ず 0 です。"
  976. # 9b5f4c10ac4a46879b3b1d300ec5fbe4
  977. #: ../../library/socket.rst:857
  978. msgid ""
  979. "Return a :term:`file object` associated with the socket. The exact returned"
  980. " type depends on the arguments given to :meth:`makefile`. These arguments "
  981. "are interpreted the same way as by the built-in :func:`open` function."
  982. msgstr ""
  983. # 69d19d0595284b179729781630dbe4a2
  984. #: ../../library/socket.rst:861
  985. msgid ""
  986. "The socket must be in blocking mode; it can have a timeout, but the file "
  987. "object's internal buffer may end up in a inconsistent state if a timeout "
  988. "occurs."
  989. msgstr ""
  990. # da3712a18bf74483aedfc59cc32e3a77
  991. #: ../../library/socket.rst:865
  992. msgid ""
  993. "Closing the file object returned by :meth:`makefile` won't close the "
  994. "original socket unless all other file objects have been closed and "
  995. ":meth:`socket.close` has been called on the socket object."
  996. msgstr ""
  997. # 0db155f75b034bc3a62f246f3a108881
  998. #: ../../library/socket.rst:871
  999. msgid ""
  1000. "On Windows, the file-like object created by :meth:`makefile` cannot be used "
  1001. "where a file object with a file descriptor is expected, such as the stream "
  1002. "arguments of :meth:`subprocess.Popen`."
  1003. msgstr "Windows では、 :meth:`makefile` によって作成される file-like オブジェクトは、 :meth:`subprocess.Popen` などのファイルディスクリプタのある file オブジェクトを期待している場所で利用することはできません。"
  1004. # d7385b182ced46be8ed5914f186a11c2
  1005. #: ../../library/socket.rst:878
  1006. msgid ""
  1007. "Receive data from the socket. The return value is a bytes object "
  1008. "representing the data received. The maximum amount of data to be received "
  1009. "at once is specified by *bufsize*. See the Unix manual page "
  1010. ":manpage:`recv(2)` for the meaning of the optional argument *flags*; it "
  1011. "defaults to zero."
  1012. msgstr ""
  1013. # 3a21a12c1d6b4bef949750bb63ed4d76
  1014. #: ../../library/socket.rst:885
  1015. msgid ""
  1016. "For best match with hardware and network realities, the value of *bufsize* "
  1017. "should be a relatively small power of 2, for example, 4096."
  1018. msgstr "ハードウェアおよびネットワークの現実に最大限マッチするように、 *bufsize* の値は比較的小さい2の累乗、たとえば 4096、にすべきです。"
  1019. # 2147fdb7cd1e4c1f8b71739b40dc3e4f
  1020. #: ../../library/socket.rst:891
  1021. msgid ""
  1022. "Receive data from the socket. The return value is a pair ``(bytes, "
  1023. "address)`` where *bytes* is a bytes object representing the data received "
  1024. "and *address* is the address of the socket sending the data. See the Unix "
  1025. "manual page :manpage:`recv(2)` for the meaning of the optional argument "
  1026. "*flags*; it defaults to zero. (The format of *address* depends on the "
  1027. "address family --- see above.)"
  1028. msgstr "ソケットからデータを受信し、結果をタプル ``(bytes, address)`` として返します。 *bytes* は受信データの文字列で、 *address* は送信元のアドレスを示します。オプション引数 *flags* については、 Unix のマニュアルページ :manpage:`recv(2)` を参照してください。デフォルトは0です。 (*address* のフォーマットはアドレスファミリによって異なります(前述))"
  1029. # 6306a7f1169e464bb895df3d2b489a22
  1030. #: ../../library/socket.rst:900
  1031. msgid ""
  1032. "Receive normal data (up to *bufsize* bytes) and ancillary data from the "
  1033. "socket. The *ancbufsize* argument sets the size in bytes of the internal "
  1034. "buffer used to receive the ancillary data; it defaults to 0, meaning that no"
  1035. " ancillary data will be received. Appropriate buffer sizes for ancillary "
  1036. "data can be calculated using :func:`CMSG_SPACE` or :func:`CMSG_LEN`, and "
  1037. "items which do not fit into the buffer might be truncated or discarded. The"
  1038. " *flags* argument defaults to 0 and has the same meaning as for "
  1039. ":meth:`recv`."
  1040. msgstr ""
  1041. # 29b9c5ed6e0643329761fa30d09e63a7
  1042. #: ../../library/socket.rst:910
  1043. msgid ""
  1044. "The return value is a 4-tuple: ``(data, ancdata, msg_flags, address)``. The"
  1045. " *data* item is a :class:`bytes` object holding the non-ancillary data "
  1046. "received. The *ancdata* item is a list of zero or more tuples "
  1047. "``(cmsg_level, cmsg_type, cmsg_data)`` representing the ancillary data "
  1048. "(control messages) received: *cmsg_level* and *cmsg_type* are integers "
  1049. "specifying the protocol level and protocol-specific type respectively, and "
  1050. "*cmsg_data* is a :class:`bytes` object holding the associated data. The "
  1051. "*msg_flags* item is the bitwise OR of various flags indicating conditions on"
  1052. " the received message; see your system documentation for details. If the "
  1053. "receiving socket is unconnected, *address* is the address of the sending "
  1054. "socket, if available; otherwise, its value is unspecified."
  1055. msgstr ""
  1056. # 83ccaf03fd4e4b92a801154e5a6edec2
  1057. #: ../../library/socket.rst:924
  1058. msgid ""
  1059. "On some systems, :meth:`sendmsg` and :meth:`recvmsg` can be used to pass "
  1060. "file descriptors between processes over an :const:`AF_UNIX` socket. When "
  1061. "this facility is used (it is often restricted to :const:`SOCK_STREAM` "
  1062. "sockets), :meth:`recvmsg` will return, in its ancillary data, items of the "
  1063. "form ``(socket.SOL_SOCKET, socket.SCM_RIGHTS, fds)``, where *fds* is a "
  1064. ":class:`bytes` object representing the new file descriptors as a binary "
  1065. "array of the native C :c:type:`int` type. If :meth:`recvmsg` raises an "
  1066. "exception after the system call returns, it will first attempt to close any "
  1067. "file descriptors received via this mechanism."
  1068. msgstr ""
  1069. # bb2310be58de456f8237f2c1be1dd110
  1070. #: ../../library/socket.rst:935
  1071. msgid ""
  1072. "Some systems do not indicate the truncated length of ancillary data items "
  1073. "which have been only partially received. If an item appears to extend "
  1074. "beyond the end of the buffer, :meth:`recvmsg` will issue a "
  1075. ":exc:`RuntimeWarning`, and will return the part of it which is inside the "
  1076. "buffer provided it has not been truncated before the start of its associated"
  1077. " data."
  1078. msgstr ""
  1079. # a324dc99a25a4559b7da26b6d8201c70
  1080. #: ../../library/socket.rst:942
  1081. msgid ""
  1082. "On systems which support the :const:`SCM_RIGHTS` mechanism, the following "
  1083. "function will receive up to *maxfds* file descriptors, returning the message"
  1084. " data and a list containing the descriptors (while ignoring unexpected "
  1085. "conditions such as unrelated control messages being received). See also "
  1086. ":meth:`sendmsg`. ::"
  1087. msgstr ""
  1088. # 79276ab1c2d546b0aa1221553610b4c9
  1089. #: ../../library/socket.rst:966
  1090. msgid ""
  1091. "Receive normal data and ancillary data from the socket, behaving as "
  1092. ":meth:`recvmsg` would, but scatter the non-ancillary data into a series of "
  1093. "buffers instead of returning a new bytes object. The *buffers* argument "
  1094. "must be an iterable of objects that export writable buffers (e.g. "
  1095. ":class:`bytearray` objects); these will be filled with successive chunks of "
  1096. "the non-ancillary data until it has all been written or there are no more "
  1097. "buffers. The operating system may set a limit (:func:`~os.sysconf` value "
  1098. "``SC_IOV_MAX``) on the number of buffers that can be used. The *ancbufsize*"
  1099. " and *flags* arguments have the same meaning as for :meth:`recvmsg`."
  1100. msgstr ""
  1101. # e4c9a4057493418192eea01d2b0e2d27
  1102. #: ../../library/socket.rst:977
  1103. msgid ""
  1104. "The return value is a 4-tuple: ``(nbytes, ancdata, msg_flags, address)``, "
  1105. "where *nbytes* is the total number of bytes of non-ancillary data written "
  1106. "into the buffers, and *ancdata*, *msg_flags* and *address* are the same as "
  1107. "for :meth:`recvmsg`."
  1108. msgstr ""
  1109. # 33927a201c834cf28ad364a61ed77688
  1110. #: ../../library/socket.rst:982
  1111. msgid "Example::"
  1112. msgstr "例::"
  1113. # d2f9afbd5da8450ba447c4d7e8b89d25
  1114. #: ../../library/socket.rst:1003
  1115. msgid ""
  1116. "Receive data from the socket, writing it into *buffer* instead of creating a"
  1117. " new bytestring. The return value is a pair ``(nbytes, address)`` where "
  1118. "*nbytes* is the number of bytes received and *address* is the address of the"
  1119. " socket sending the data. See the Unix manual page :manpage:`recv(2)` for "
  1120. "the meaning of the optional argument *flags*; it defaults to zero. (The "
  1121. "format of *address* depends on the address family --- see above.)"
  1122. msgstr "ソケットからデータを受信し、そのデータを新しいバイト文字列として返す代わりに *buffer* に書きます。戻り値は ``(nbytes, address)`` のペアで、 *nbytes* は受信したデータのバイト数を、 *address* はデータを送信したソケットのアドレスです。オプション引数 *flags* (デフォルト:0) の意味については、 Unix マニュアルページ :manpage:`recv(2)` を参照してください。(*address* のフォーマットは前述のとおりアドレスファミリーに依存します。)"
  1123. # 9ca864b9a4674e5e8964b3f93d948a24
  1124. #: ../../library/socket.rst:1013
  1125. msgid ""
  1126. "Receive up to *nbytes* bytes from the socket, storing the data into a buffer"
  1127. " rather than creating a new bytestring. If *nbytes* is not specified (or "
  1128. "0), receive up to the size available in the given buffer. Returns the "
  1129. "number of bytes received. See the Unix manual page :manpage:`recv(2)` for "
  1130. "the meaning of the optional argument *flags*; it defaults to zero."
  1131. msgstr "*nbytes* バイトまでのデータをソケットから受信して、そのデータを新しいバイト文字列にするのではなく *buffer* に保存します。 *nbytes* が指定されない(あるいは0が指定された)場合、 *buffer* の利用可能なサイズまで受信します。受信したバイト数を返り値として返します。オプション引数 *flags* (デフォルト:0) の意味については、 Unix マニュアルページ :manpage:`recv(2)` を参照してください。"
  1132. # d3ed2dbaf81c42a79db2fa782c446da8
  1133. #: ../../library/socket.rst:1022
  1134. msgid ""
  1135. "Send data to the socket. The socket must be connected to a remote socket. "
  1136. "The optional *flags* argument has the same meaning as for :meth:`recv` "
  1137. "above. Returns the number of bytes sent. Applications are responsible for "
  1138. "checking that all data has been sent; if only some of the data was "
  1139. "transmitted, the application needs to attempt delivery of the remaining "
  1140. "data. For further information on this topic, consult the :ref:`socket-"
  1141. "howto`."
  1142. msgstr ""
  1143. # f9c12d1cd4fc4149b84d555b22a7050c
  1144. #: ../../library/socket.rst:1032
  1145. msgid ""
  1146. "Send data to the socket. The socket must be connected to a remote socket. "
  1147. "The optional *flags* argument has the same meaning as for :meth:`recv` "
  1148. "above. Unlike :meth:`send`, this method continues to send data from *bytes* "
  1149. "until either all data has been sent or an error occurs. ``None`` is "
  1150. "returned on success. On error, an exception is raised, and there is no way "
  1151. "to determine how much data, if any, was successfully sent."
  1152. msgstr "ソケットにデータを送信します。ソケットはリモートソケットに接続済みでなければなりません。オプション引数 *flags* の意味は、上記 :meth:`recv` と同じです。 :meth:`send` と異なり、このメソッドは *bytes* の全データを送信するか、エラーが発生するまで処理を継続します。正常終了の場合は ``None`` を返し、エラー発生時には例外が発生します。エラー発生時、送信されたバイト数を調べる事はできません。"
  1153. # 467bf26a65a34f7aad2870bdd916c8eb
  1154. #: ../../library/socket.rst:1043
  1155. msgid ""
  1156. "Send data to the socket. The socket should not be connected to a remote "
  1157. "socket, since the destination socket is specified by *address*. The "
  1158. "optional *flags* argument has the same meaning as for :meth:`recv` above. "
  1159. "Return the number of bytes sent. (The format of *address* depends on the "
  1160. "address family --- see above.)"
  1161. msgstr "ソケットにデータを送信します。このメソッドでは接続先を *address* で指定するので、接続済みではいけません。オプション引数 *flags* の意味は、上記 :meth:`recv` と同じです。戻り値として、送信したバイト数を返します。 *address* のフォーマットはアドレスファミリによって異なります(前述)。"
  1162. # 5c2bcc9768e8450bbba4e373c8be834f
  1163. #: ../../library/socket.rst:1052
  1164. msgid ""
  1165. "Send normal and ancillary data to the socket, gathering the non-ancillary "
  1166. "data from a series of buffers and concatenating it into a single message. "
  1167. "The *buffers* argument specifies the non-ancillary data as an iterable of "
  1168. "buffer-compatible objects (e.g. :class:`bytes` objects); the operating "
  1169. "system may set a limit (:func:`~os.sysconf` value ``SC_IOV_MAX``) on the "
  1170. "number of buffers that can be used. The *ancdata* argument specifies the "
  1171. "ancillary data (control messages) as an iterable of zero or more tuples "
  1172. "``(cmsg_level, cmsg_type, cmsg_data)``, where *cmsg_level* and *cmsg_type* "
  1173. "are integers specifying the protocol level and protocol-specific type "
  1174. "respectively, and *cmsg_data* is a buffer-compatible object holding the "
  1175. "associated data. Note that some systems (in particular, systems without "
  1176. ":func:`CMSG_SPACE`) might support sending only one control message per call."
  1177. " The *flags* argument defaults to 0 and has the same meaning as for "
  1178. ":meth:`send`. If *address* is supplied and not ``None``, it sets a "
  1179. "destination address for the message. The return value is the number of "
  1180. "bytes of non-ancillary data sent."
  1181. msgstr ""
  1182. # e1851ea974b64c39b9135769441f97d2
  1183. #: ../../library/socket.rst:1071
  1184. msgid ""
  1185. "The following function sends the list of file descriptors *fds* over an "
  1186. ":const:`AF_UNIX` socket, on systems which support the :const:`SCM_RIGHTS` "
  1187. "mechanism. See also :meth:`recvmsg`. ::"
  1188. msgstr ""
  1189. # d2c42579ecbc41898c3be9ace4ce04c1
  1190. #: ../../library/socket.rst:1087
  1191. msgid ""
  1192. "Set blocking or non-blocking mode of the socket: if *flag* is false, the "
  1193. "socket is set to non-blocking, else to blocking mode."
  1194. msgstr ""
  1195. # 575863e0b86f4a3cbdcec78652ffb45d
  1196. #: ../../library/socket.rst:1090
  1197. msgid ""
  1198. "This method is a shorthand for certain :meth:`~socket.settimeout` calls:"
  1199. msgstr ""
  1200. # 5db3bddc0c0a4dab8e78f620c999084b
  1201. #: ../../library/socket.rst:1092
  1202. msgid "``sock.setblocking(True)`` is equivalent to ``sock.settimeout(None)``"
  1203. msgstr ""
  1204. # cd9df25ff0274674b65422d1f3384dc3
  1205. #: ../../library/socket.rst:1094
  1206. msgid "``sock.setblocking(False)`` is equivalent to ``sock.settimeout(0.0)``"
  1207. msgstr ""
  1208. # 5ef926d9c4784146aa229faf9c0486d8
  1209. #: ../../library/socket.rst:1099
  1210. msgid ""
  1211. "Set a timeout on blocking socket operations. The *value* argument can be a "
  1212. "nonnegative floating point number expressing seconds, or ``None``. If a non-"
  1213. "zero value is given, subsequent socket operations will raise a "
  1214. ":exc:`timeout` exception if the timeout period *value* has elapsed before "
  1215. "the operation has completed. If zero is given, the socket is put in non-"
  1216. "blocking mode. If ``None`` is given, the socket is put in blocking mode."
  1217. msgstr ""
  1218. # b520f65855da45aeb2b185429172fa66
  1219. #: ../../library/socket.rst:1106
  1220. msgid ""
  1221. "For further information, please consult the :ref:`notes on socket timeouts "
  1222. "<socket-timeouts>`."
  1223. msgstr ""
  1224. # fd824c4ca65d49bba88f60decd8e8a8b
  1225. #: ../../library/socket.rst:1113
  1226. msgid ""
  1227. "Set the value of the given socket option (see the Unix manual page "
  1228. ":manpage:`setsockopt(2)`). The needed symbolic constants are defined in the"
  1229. " :mod:`socket` module (:const:`SO_\\*` etc.). The value can be an integer "
  1230. "or a bytes object representing a buffer. In the latter case it is up to the"
  1231. " caller to ensure that the bytestring contains the proper bits (see the "
  1232. "optional built-in module :mod:`struct` for a way to encode C structures as "
  1233. "bytestrings)."
  1234. msgstr "ソケットのオプションを設定します(Unixのマニュアルページ :manpage:`setsockopt(2)` を参照)。 :const:`SO_\\*` 等のシンボルは、このモジュールで定義しています。 ``value`` には、整数またはバイト列オブジェクトをバッファとして指定する事ができます。文字列を指定する場合、文字列には適切なビットを設定するようにします (:mod:`struct` モジュールを利用すれば、Cの構造体をバイト文字列にエンコードする事ができます)。"
  1235. # 0937f0d6a4754f0f97db2291342d9ebc
  1236. #: ../../library/socket.rst:1123
  1237. msgid ""
  1238. "Shut down one or both halves of the connection. If *how* is "
  1239. ":const:`SHUT_RD`, further receives are disallowed. If *how* is "
  1240. ":const:`SHUT_WR`, further sends are disallowed. If *how* is "
  1241. ":const:`SHUT_RDWR`, further sends and receives are disallowed."
  1242. msgstr "接続の片方向、または両方向を切断します。 *how* が :const:`SHUT_RD` の場合、以降は受信を行えません。 *how* が :const:`SHUT_WR` の場合、以降は送信を行えません。 *how* が ``SHUT_RDWR`` の場合、以降は送受信を行えません。"
  1243. # 39dd6776bcc544ec945df03038704fc4
  1244. #: ../../library/socket.rst:1131
  1245. msgid ""
  1246. "Duplicate a socket and prepare it for sharing with a target process. The "
  1247. "target process must be provided with *process_id*. The resulting bytes "
  1248. "object can then be passed to the target process using some form of "
  1249. "interprocess communication and the socket can be recreated there using "
  1250. ":func:`fromshare`. Once this method has been called, it is safe to close the"
  1251. " socket since the operating system has already duplicated it for the target "
  1252. "process."
  1253. msgstr ""
  1254. # 29f21a711c074212afd8592f8379d7e0
  1255. #: ../../library/socket.rst:1143
  1256. msgid ""
  1257. "Note that there are no methods :meth:`read` or :meth:`write`; use "
  1258. ":meth:`~socket.recv` and :meth:`~socket.send` without *flags* argument "
  1259. "instead."
  1260. msgstr ":meth:`read` メソッドと :meth:`write` メソッドは存在しませんので注意してください。代わりに *flags* を省略した :meth:`~socket.recv` と :meth:`~socket.send` を使うことができます。"
  1261. # 32f731f8661046c0bcd56a8eaaf09c8c
  1262. #: ../../library/socket.rst:1146
  1263. msgid ""
  1264. "Socket objects also have these (read-only) attributes that correspond to the"
  1265. " values given to the :class:`socket` constructor."
  1266. msgstr "ソケットオブジェクトには以下の :class:`socket` コンストラクタに渡された値に対応した(読み出し専用)属性があります。"
  1267. # d55d380ed12543c9b6e89d30931514cd
  1268. #: ../../library/socket.rst:1152
  1269. msgid "The socket family."
  1270. msgstr "ソケットファミリー。"
  1271. # 3f4fd6cd9af5466f9c57822577d2449f
  1272. #: ../../library/socket.rst:1157
  1273. msgid "The socket type."
  1274. msgstr "ソケットタイプ。"
  1275. # 89c9509ebd5d4c91915d57b3b80ade6f
  1276. #: ../../library/socket.rst:1162
  1277. msgid "The socket protocol."
  1278. msgstr "ソケットプロトコル。"
  1279. # 52a1b5c265034739b2abbeb209347740
  1280. #: ../../library/socket.rst:1169
  1281. msgid "Notes on socket timeouts"
  1282. msgstr ""
  1283. # d03f86ba105946fd9504c7ecba78216f
  1284. #: ../../library/socket.rst:1171
  1285. msgid ""
  1286. "A socket object can be in one of three modes: blocking, non-blocking, or "
  1287. "timeout. Sockets are by default always created in blocking mode, but this "
  1288. "can be changed by calling :func:`setdefaulttimeout`."
  1289. msgstr ""
  1290. # 695d3c8abdef4543af329b643953866d
  1291. #: ../../library/socket.rst:1175
  1292. msgid ""
  1293. "In *blocking mode*, operations block until complete or the system returns an"
  1294. " error (such as connection timed out)."
  1295. msgstr ""
  1296. # 36117dce2eba4f0193eae2ea1ed95a25
  1297. #: ../../library/socket.rst:1178
  1298. msgid ""
  1299. "In *non-blocking mode*, operations fail (with an error that is unfortunately"
  1300. " system-dependent) if they cannot be completed immediately: functions from "
  1301. "the :mod:`select` can be used to know when and whether a socket is available"
  1302. " for reading or writing."
  1303. msgstr ""
  1304. # 170c44c71ac84faf872b1c8b0e0f4049
  1305. #: ../../library/socket.rst:1183
  1306. msgid ""
  1307. "In *timeout mode*, operations fail if they cannot be completed within the "
  1308. "timeout specified for the socket (they raise a :exc:`timeout` exception) or "
  1309. "if the system returns an error."
  1310. msgstr ""
  1311. # ca0939fe859544f5ac8298982a9ba395
  1312. #: ../../library/socket.rst:1188
  1313. msgid ""
  1314. "At the operating system level, sockets in *timeout mode* are internally set "
  1315. "in non-blocking mode. Also, the blocking and timeout modes are shared "
  1316. "between file descriptors and socket objects that refer to the same network "
  1317. "endpoint. This implementation detail can have visible consequences if e.g. "
  1318. "you decide to use the :meth:`~socket.fileno()` of a socket."
  1319. msgstr ""
  1320. # 00f3a4c1fb434937bcea241ccba1541f
  1321. #: ../../library/socket.rst:1195
  1322. msgid "Timeouts and the ``connect`` method"
  1323. msgstr ""
  1324. # aef299ca42974a088811e47be15840e5
  1325. #: ../../library/socket.rst:1197
  1326. msgid ""
  1327. "The :meth:`~socket.connect` operation is also subject to the timeout "
  1328. "setting, and in general it is recommended to call :meth:`~socket.settimeout`"
  1329. " before calling :meth:`~socket.connect` or pass a timeout parameter to "
  1330. ":meth:`create_connection`. However, the system network stack may also "
  1331. "return a connection timeout error of its own regardless of any Python socket"
  1332. " timeout setting."
  1333. msgstr ""
  1334. # dc8099e289d34b8199e62c3cefef2520
  1335. #: ../../library/socket.rst:1205
  1336. msgid "Timeouts and the ``accept`` method"
  1337. msgstr ""
  1338. # dcc43c90abea426eb8374aefae6988f7
  1339. #: ../../library/socket.rst:1207
  1340. msgid ""
  1341. "If :func:`getdefaulttimeout` is not :const:`None`, sockets returned by the "
  1342. ":meth:`~socket.accept` method inherit that timeout. Otherwise, the "
  1343. "behaviour depends on settings of the listening socket:"
  1344. msgstr ""
  1345. # 807d8dda3e4e4b788c2c3e88fa0a98b3
  1346. #: ../../library/socket.rst:1211
  1347. msgid ""
  1348. "if the listening socket is in *blocking mode* or in *timeout mode*, the "
  1349. "socket returned by :meth:`~socket.accept` is in *blocking mode*;"
  1350. msgstr ""
  1351. # d3db6b8d6c7841e4b10d38c404c869f5
  1352. #: ../../library/socket.rst:1214
  1353. msgid ""
  1354. "if the listening socket is in *non-blocking mode*, whether the socket "
  1355. "returned by :meth:`~socket.accept` is in blocking or non-blocking mode is "
  1356. "operating system-dependent. If you want to ensure cross-platform behaviour,"
  1357. " it is recommended you manually override this setting."
  1358. msgstr ""
  1359. # 84aabc75cc6a4cab8c61a386e3dcae35
  1360. #: ../../library/socket.rst:1223
  1361. msgid "Example"
  1362. msgstr "例"
  1363. # 335e390652a7407ca39d296b6a594d16
  1364. #: ../../library/socket.rst:1225
  1365. msgid ""
  1366. "Here are four minimal example programs using the TCP/IP protocol: a server "
  1367. "that echoes all data that it receives back (servicing only one client), and "
  1368. "a client using it. Note that a server must perform the sequence "
  1369. ":func:`.socket`, :meth:`~socket.bind`, :meth:`~socket.listen`, "
  1370. ":meth:`~socket.accept` (possibly repeating the :meth:`~socket.accept` to "
  1371. "service more than one client), while a client only needs the sequence "
  1372. ":func:`.socket`, :meth:`~socket.connect`. Also note that the server does "
  1373. "not :meth:`~socket.sendall`/:meth:`~socket.recv` on the socket it is "
  1374. "listening on but on the new socket returned by :meth:`~socket.accept`."
  1375. msgstr ""
  1376. # 2edf75dcf9d244af88fe46207f802bd9
  1377. #: ../../library/socket.rst:1235
  1378. msgid "The first two examples support IPv4 only. ::"
  1379. msgstr "次のクライアントとサーバは、IPv4のみをサポートしています。 ::"
  1380. # b66148a82efb4aeca21c6527f1390399
  1381. #: ../../library/socket.rst:1267
  1382. msgid ""
  1383. "The next two examples are identical to the above two, but support both IPv4 "
  1384. "and IPv6. The server side will listen to the first address family available "
  1385. "(it should listen to both instead). On most of IPv6-ready systems, IPv6 will"
  1386. " take precedence and the server may not accept IPv4 traffic. The client side"
  1387. " will try to connect to the all addresses returned as a result of the name "
  1388. "resolution, and sends traffic to the first one connected successfully. ::"
  1389. msgstr "次のサンプルは上記のサンプルとほとんど同じですが、IPv4とIPv6の両方をサポートしています。サーバでは、IPv4/v6の両方ではなく、利用可能な最初のアドレスファミリだけをlistenしています。ほとんどのIPv6対応システムではIPv6が先に現れるため、サーバはIPv4には応答しません。クライアントでは名前解決の結果として取得したアドレスに順次接続を試み、最初に接続に成功したソケットにデータを送信しています。 ::"
  1390. # b0cdfc0b7c40457f95af07b394bcb4d8
  1391. #: ../../library/socket.rst:1340
  1392. msgid ""
  1393. "The next example shows how to write a very simple network sniffer with raw "
  1394. "sockets on Windows. The example requires administrator privileges to modify "
  1395. "the interface::"
  1396. msgstr "次の例は、Windowsで raw socket を利用して非常にシンプルなネットワークスニファーを書きます。このサンプルを実行するには、インタフェースを操作するための管理者権限が必要です::"
  1397. # c2b3e045c6464ebfb4f103ef699952b8
  1398. #: ../../library/socket.rst:1365
  1399. msgid ""
  1400. "The last example shows how to use the socket interface to communicate to a "
  1401. "CAN network. This example might require special priviledge::"
  1402. msgstr ""
  1403. # fa76f50bc11e422593226d00627f27ce
  1404. #: ../../library/socket.rst:1406
  1405. msgid ""
  1406. "Running an example several times with too small delay between executions, "
  1407. "could lead to this error::"
  1408. msgstr ""
  1409. # fe56c8172afc41a0817bc99267597ad9
  1410. #: ../../library/socket.rst:1411
  1411. msgid ""
  1412. "This is because the previous execution has left the socket in a "
  1413. "``TIME_WAIT`` state, and can't be immediately reused."
  1414. msgstr ""
  1415. # a2d9c7600a244d8aaffafc7c7bd5217e
  1416. #: ../../library/socket.rst:1414
  1417. msgid ""
  1418. "There is a :mod:`socket` flag to set, in order to prevent this, "
  1419. ":data:`socket.SO_REUSEADDR`::"
  1420. msgstr ""
  1421. # 933f558c6ff641b9a1f38813d975b18f
  1422. #: ../../library/socket.rst:1421
  1423. msgid ""
  1424. "the :data:`SO_REUSEADDR` flag tells the kernel to reuse a local socket in "
  1425. "``TIME_WAIT`` state, without waiting for its natural timeout to expire."
  1426. msgstr ""
  1427. # 47e84bd43cfb4f46b01e004d084eb905
  1428. #: ../../library/socket.rst:1427
  1429. msgid ""
  1430. "For an introduction to socket programming (in C), see the following papers:"
  1431. msgstr ""
  1432. # beda6c0761884fc28d70959a34badd00
  1433. #: ../../library/socket.rst:1429
  1434. msgid ""
  1435. "*An Introductory 4.3BSD Interprocess Communication Tutorial*, by Stuart "
  1436. "Sechrest"
  1437. msgstr ""
  1438. # fe182eeff6b14fc5b11c6727cefb3820
  1439. #: ../../library/socket.rst:1431
  1440. msgid ""
  1441. "*An Advanced 4.3BSD Interprocess Communication Tutorial*, by Samuel J. "
  1442. "Leffler et al,"
  1443. msgstr ""
  1444. # 31b716f717d348acac29f666207a0bdb
  1445. #: ../../library/socket.rst:1434
  1446. msgid ""
  1447. "both in the UNIX Programmer's Manual, Supplementary Documents 1 (sections "
  1448. "PS1:7 and PS1:8). The platform-specific reference material for the various "
  1449. "socket-related system calls are also a valuable source of information on the"
  1450. " details of socket semantics. For Unix, refer to the manual pages; for "
  1451. "Windows, see the WinSock (or Winsock 2) specification. For IPv6-ready APIs,"
  1452. " readers may want to refer to :rfc:`3493` titled Basic Socket Interface "
  1453. "Extensions for IPv6."
  1454. msgstr ""
  1455. # 14e893c234044918a605d0f03c4170c9
  1456. #: ../../library/socket.rst:17
  1457. msgid "socket"
  1458. msgstr ""
  1459. # 461f58032f504769b6ed691559e20b65
  1460. #: ../../library/socket.rst:855
  1461. msgid "I/O control"
  1462. msgstr "I/O control"
  1463. # 461f58032f504769b6ed691559e20b65
  1464. #: ../../library/socket.rst:855
  1465. msgid "buffering"
  1466. msgstr "buffering"
  1467. # 72aef4ef3af14c299956028aa524fb95
  1468. #: ../../library/socket.rst:1111
  1469. msgid "struct"
  1470. msgstr ""