PageRenderTime 2ms CodeModel.GetById 170ms app.highlight 17ms RepoModel.GetById 1ms app.codeStats 1ms

/locale/pot/library/socket.pot

https://bitbucket.org/pydocja/py33
Unknown | 1059 lines | 859 code | 200 blank | 0 comment | 0 complexity | 5d11454f0601b21097ce3221d1b47e5a MD5 | raw file

Large files files are truncated, but you can click here to view the full 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# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
  5#
  6#, fuzzy
  7msgid ""
  8msgstr ""
  9"Project-Id-Version: Python 3.3\n"
 10"Report-Msgid-Bugs-To: \n"
 11"POT-Creation-Date: 2013-12-30 03:15+0900\n"
 12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 14"Language-Team: LANGUAGE <LL@li.org>\n"
 15"MIME-Version: 1.0\n"
 16"Content-Type: text/plain; charset=UTF-8\n"
 17"Content-Transfer-Encoding: 8bit\n"
 18
 19#: ../../library/socket.rst:2
 20# 0236b58df588443eb76a12ea95636e8d
 21msgid ":mod:`socket` --- Low-level networking interface"
 22msgstr ""
 23
 24#: ../../library/socket.rst:8
 25# 39ac663abd6946c1acad4bb1e2679a2b
 26msgid "This module provides access to the BSD *socket* interface. It is available on all modern Unix systems, Windows, MacOS, OS/2, and probably additional platforms."
 27msgstr ""
 28
 29#: ../../library/socket.rst:14
 30# 718a821c9d5f40348031abc067c5616c
 31msgid "Some behavior may be platform dependent, since calls are made to the operating system socket APIs."
 32msgstr ""
 33
 34#: ../../library/socket.rst:19
 35# ca7b34c1b7d240388581b066ca7b1a48
 36msgid "The Python interface is a straightforward transliteration of the Unix system call and library interface for sockets to Python's object-oriented style: the :func:`.socket` function returns a :dfn:`socket object` whose methods implement the various socket system calls.  Parameter types are somewhat higher-level than in the C interface: as with :meth:`read` and :meth:`write` operations on Python files, buffer allocation on receive operations is automatic, and buffer length is implicit on send operations."
 37msgstr ""
 38
 39#: ../../library/socket.rst:31
 40# e0c20439c0164148aad4d48a4ca7d254
 41msgid "Module :mod:`socketserver`"
 42msgstr ""
 43
 44#: ../../library/socket.rst:31
 45# efec016c2eff4baab798422bb99ef14a
 46msgid "Classes that simplify writing network servers."
 47msgstr ""
 48
 49#: ../../library/socket.rst:33
 50# 989e5cb4de5e4315a9114f887158f0c1
 51msgid "Module :mod:`ssl`"
 52msgstr ""
 53
 54#: ../../library/socket.rst:34
 55# 6c189024ffc94750bf12dc9d670119e3
 56msgid "A TLS/SSL wrapper for socket objects."
 57msgstr ""
 58
 59#: ../../library/socket.rst:38
 60# 00a4d609e3e8483da087b231047ed51c
 61msgid "Socket families"
 62msgstr ""
 63
 64#: ../../library/socket.rst:40
 65# 08f038c8dba14eedb2fcebc97d071090
 66msgid "Depending on the system and the build options, various socket families are supported by this module."
 67msgstr ""
 68
 69#: ../../library/socket.rst:43
 70# 6addf586f996425cb91b8dea853c5e7c
 71msgid "The address format required by a particular socket object is automatically selected based on the address family specified when the socket object was created.  Socket addresses are represented as follows:"
 72msgstr ""
 73
 74#: ../../library/socket.rst:47
 75# 3fa272622cd04224a788ad32e0fc01c6
 76msgid "The address of an :const:`AF_UNIX` socket bound to a file system node is represented as a string, using the file system encoding and the ``'surrogateescape'`` error handler (see :pep:`383`).  An address in Linux's abstract namespace is returned as a :class:`bytes` object with an initial null byte; note that sockets in this namespace can communicate with normal file system sockets, so programs intended to run on Linux may need to deal with both types of address.  A string or :class:`bytes` object can be used for either type of address when passing it as an argument."
 77msgstr ""
 78
 79#: ../../library/socket.rst:57
 80#: ../../library/socket.rst:57
 81# 9839710817f94ceaaac5863b76436945
 82# 7bd17ebd489b4cfa9d6c02a271ba933e
 83msgid "Previously, :const:`AF_UNIX` socket paths were assumed to use UTF-8 encoding."
 84msgstr ""
 85
 86#: ../../library/socket.rst:61
 87# aec6ff2faa6e469cb726b7391dbb22b1
 88msgid "A pair ``(host, port)`` is used for the :const:`AF_INET` address family, where *host* is a string representing either a hostname in Internet domain notation like ``'daring.cwi.nl'`` or an IPv4 address like ``'100.50.200.5'``, and *port* is an integer."
 89msgstr ""
 90
 91#: ../../library/socket.rst:66
 92# 8b2cdc7122d04792a16dffe89c0077b8
 93msgid "For :const:`AF_INET6` address family, a four-tuple ``(host, port, flowinfo, scopeid)`` is used, where *flowinfo* and *scopeid* represent the ``sin6_flowinfo`` and ``sin6_scope_id`` members in :const:`struct sockaddr_in6` in C.  For :mod:`socket` module methods, *flowinfo* and *scopeid* can be omitted just for backward compatibility.  Note, however, omission of *scopeid* can cause problems in manipulating scoped IPv6 addresses."
 94msgstr ""
 95
 96#: ../../library/socket.rst:73
 97# 0e2a1a9ff3f94bc184e4dd65ce0a0cf4
 98msgid ":const:`AF_NETLINK` sockets are represented as pairs ``(pid, groups)``."
 99msgstr ""
100
101#: ../../library/socket.rst:75
102# 5d42958d185e4699a2671ea9865f37ed
103msgid "Linux-only support for TIPC is available using the :const:`AF_TIPC` address family.  TIPC is an open, non-IP based networked protocol designed for use in clustered computer environments.  Addresses are represented by a tuple, and the fields depend on the address type. The general tuple form is ``(addr_type, v1, v2, v3 [, scope])``, where:"
104msgstr ""
105
106#: ../../library/socket.rst:81
107# ed9834ecf78143d0bfccee3128289a04
108msgid "*addr_type* is one of :const:`TIPC_ADDR_NAMESEQ`, :const:`TIPC_ADDR_NAME`, or :const:`TIPC_ADDR_ID`."
109msgstr ""
110
111#: ../../library/socket.rst:83
112# 839d171395dd4e5abec7fa7d19f06416
113msgid "*scope* is one of :const:`TIPC_ZONE_SCOPE`, :const:`TIPC_CLUSTER_SCOPE`, and :const:`TIPC_NODE_SCOPE`."
114msgstr ""
115
116#: ../../library/socket.rst:85
117# 7957cc3c432345f18edd34a599d7ccba
118msgid "If *addr_type* is :const:`TIPC_ADDR_NAME`, then *v1* is the server type, *v2* is the port identifier, and *v3* should be 0."
119msgstr ""
120
121#: ../../library/socket.rst:88
122# c903c568e4c743a18376a595f02ada26
123msgid "If *addr_type* is :const:`TIPC_ADDR_NAMESEQ`, then *v1* is the server type, *v2* is the lower port number, and *v3* is the upper port number."
124msgstr ""
125
126#: ../../library/socket.rst:91
127#: ../../library/socket.rst:94
128# 66c93722656749978b3884ced870def9
129# 3d8854372122489aa178015476388c81
130msgid "If *addr_type* is :const:`TIPC_ADDR_ID`, then *v1* is the node, *v2* is the reference, and *v3* should be set to 0."
131msgstr ""
132
133#: ../../library/socket.rst:97
134# 866f02d98b2d4b86ab8c25706897e5af
135msgid "A tuple ``(interface, )`` is used for the :const:`AF_CAN` address family, where *interface* is a string representing a network interface name like ``'can0'``. The network interface name ``''`` can be used to receive packets from all network interfaces of this family."
136msgstr ""
137
138#: ../../library/socket.rst:102
139# fc3c4663cfb9404eabf6c14fe10f8a5b
140msgid "A string or a tuple ``(id, unit)`` is used for the :const:`SYSPROTO_CONTROL` protocol of the :const:`PF_SYSTEM` family. The string is the name of a kernel control using a dynamically-assigned ID. The tuple can be used if ID and unit number of the kernel control are known or if a registered ID is used."
141msgstr ""
142
143#: ../../library/socket.rst:110
144# 2479e37fd40c408e969e04c6e8e8a6d3
145msgid "Certain other address families (:const:`AF_BLUETOOTH`, :const:`AF_PACKET`) support specific representations."
146msgstr ""
147
148#: ../../library/socket.rst:115
149# 3226490d328442d98e294780fdb05429
150msgid "For IPv4 addresses, two special forms are accepted instead of a host address: the empty string represents :const:`INADDR_ANY`, and the string ``'<broadcast>'`` represents :const:`INADDR_BROADCAST`.  This behavior is not compatible with IPv6, therefore, you may want to avoid these if you intend to support IPv6 with your Python programs."
151msgstr ""
152
153#: ../../library/socket.rst:121
154# 0f932973a17e4bafbb65b8560c23553d
155msgid "If you use a hostname in the *host* portion of IPv4/v6 socket address, the program may show a nondeterministic behavior, as Python uses the first address returned from the DNS resolution.  The socket address will be resolved differently into an actual IPv4/v6 address, depending on the results from DNS resolution and/or the host configuration.  For deterministic behavior use a numeric address in *host* portion."
156msgstr ""
157
158#: ../../library/socket.rst:128
159# 5f5a26b7db4a488d8b94af1ba28b351d
160msgid "All errors raise exceptions.  The normal exceptions for invalid argument types and out-of-memory conditions can be raised; starting from Python 3.3, errors related to socket or address semantics raise :exc:`OSError` or one of its subclasses (they used to raise :exc:`socket.error`)."
161msgstr ""
162
163#: ../../library/socket.rst:133
164# c95723e1a2b44d98b69d8d89a621cb21
165msgid "Non-blocking mode is supported through :meth:`~socket.setblocking`.  A generalization of this based on timeouts is supported through :meth:`~socket.settimeout`."
166msgstr ""
167
168#: ../../library/socket.rst:139
169# c774f0944c484502bf96c2b5ce07ce68
170msgid "Module contents"
171msgstr ""
172
173#: ../../library/socket.rst:141
174# 7cd19c82a9bb4fe2bd40d368acf19240
175msgid "The module :mod:`socket` exports the following elements."
176msgstr ""
177
178#: ../../library/socket.rst:145
179# 794c39a39a3941119d1c606ae090be58
180msgid "Exceptions"
181msgstr ""
182
183#: ../../library/socket.rst:149
184# c3194afd41c8423bb4d47c74ab0ba35d
185msgid "A deprecated alias of :exc:`OSError`."
186msgstr ""
187
188#: ../../library/socket.rst:151
189#: ../../library/socket.rst:151
190# ef4928f7db6c41e78c390b16f15e07a7
191# 71118ae47376428ea68fb8120ad9b859
192msgid "Following :pep:`3151`, this class was made an alias of :exc:`OSError`."
193msgstr ""
194
195#: ../../library/socket.rst:157
196# 3923e5f10d4749e2a7acc71ad543d14a
197msgid "A subclass of :exc:`OSError`, this exception is raised for address-related errors, i.e. for functions that use *h_errno* in the POSIX C API, including :func:`gethostbyname_ex` and :func:`gethostbyaddr`. The accompanying value is a pair ``(h_errno, string)`` representing an error returned by a library call.  *h_errno* is a numeric value, while *string* represents the description of *h_errno*, as returned by the :c:func:`hstrerror` C function."
198msgstr ""
199
200#: ../../library/socket.rst:165
201#: ../../library/socket.rst:165
202#: ../../library/socket.rst:178
203#: ../../library/socket.rst:178
204#: ../../library/socket.rst:189
205#: ../../library/socket.rst:189
206# 4d701008711d49ed86e19fc540460417
207# d1ec22a46ee243f9b8111d39c3c1d43e
208# e2650f492cb14c8b84978b65ae8f7612
209# 0400c4612d67460ab25c7ae831d3aea9
210# d8fb49a1279e46f3855348b4ff60dea4
211# 02b3273a18384a169b13238f572826cf
212msgid "This class was made a subclass of :exc:`OSError`."
213msgstr ""
214
215#: ../../library/socket.rst:170
216# b0d65754dfcc40c3b80ddb05161881db
217msgid "A subclass of :exc:`OSError`, this exception is raised for address-related errors by :func:`getaddrinfo` and :func:`getnameinfo`. The accompanying value is a pair ``(error, string)`` representing an error returned by a library call.  *string* represents the description of *error*, as returned by the :c:func:`gai_strerror` C function.  The numeric *error* value will match one of the :const:`EAI_\\*` constants defined in this module."
218msgstr ""
219
220#: ../../library/socket.rst:183
221# 1b58db6b4f21479aa49e62800ec4be1c
222msgid "A subclass of :exc:`OSError`, this exception is raised when a timeout occurs on a socket which has had timeouts enabled via a prior call to :meth:`~socket.settimeout` (or implicitly through :func:`~socket.setdefaulttimeout`).  The accompanying value is a string whose value is currently always \"timed out\"."
223msgstr ""
224
225#: ../../library/socket.rst:194
226# 35283adb7130476e834a20e97ad0da33
227msgid "Constants"
228msgstr ""
229
230#: ../../library/socket.rst:200
231# b0a4f1d27da446b48f1fcea348ecbf78
232msgid "These constants represent the address (and protocol) families, used for the first argument to :func:`.socket`.  If the :const:`AF_UNIX` constant is not defined then this protocol is unsupported.  More constants may be available depending on the system."
233msgstr ""
234
235#: ../../library/socket.rst:212
236# 3e241f0c8fdd4c2bad50d8974eb4a4df
237msgid "These constants represent the socket types, used for the second argument to :func:`.socket`.  More constants may be available depending on the system. (Only :const:`SOCK_STREAM` and :const:`SOCK_DGRAM` appear to be generally useful.)"
238msgstr ""
239
240#: ../../library/socket.rst:220
241# d03f8b97cc2c4fb6ba04feef70ccfe61
242msgid "These two constants, if defined, can be combined with the socket types and allow you to set some flags atomically (thus avoiding possible race conditions and the need for separate calls)."
243msgstr ""
244
245#: ../../library/socket.rst:226
246# 3e4f897695cb44978c610ec567f67005
247msgid "`Secure File Descriptor Handling <http://udrepper.livejournal.com/20407.html>`_ for a more thorough explanation."
248msgstr ""
249
250#: ../../library/socket.rst:229
251# 0666bebc969947ac8b299f164398a3c6
252msgid "Availability: Linux >= 2.6.27."
253msgstr ""
254
255#: ../../library/socket.rst:248
256# 9cf14a3caa5c48d3b25208f963ed065a
257msgid "Many constants of these forms, documented in the Unix documentation on sockets and/or the IP protocol, are also defined in the socket module. They are generally used in arguments to the :meth:`setsockopt` and :meth:`getsockopt` methods of socket objects.  In most cases, only those symbols that are defined in the Unix header files are defined; for a few symbols, default values are provided."
258msgstr ""
259
260#: ../../library/socket.rst:260
261#: ../../library/socket.rst:273
262# a8b7601b2a574d7ba229aa1ca6215fc0
263# eb8f2abf858f49178a923f807b693c76
264msgid "Many constants of these forms, documented in the Linux documentation, are also defined in the socket module."
265msgstr ""
266
267#: ../../library/socket.rst:263
268# 4d0156314e434366bb56040b9bc9f745
269msgid "Availability: Linux >= 2.6.25."
270msgstr ""
271
272#: ../../library/socket.rst:276
273# 67717c2e6b6d4b038be2b9a11d90cd81
274msgid "Availability: Linux >= 2.6.30."
275msgstr ""
276
277#: ../../library/socket.rst:284
278# 5331acc939604d8e90d4581ef08eebe7
279msgid "Constants for Windows' WSAIoctl(). The constants are used as arguments to the :meth:`~socket.socket.ioctl` method of socket objects."
280msgstr ""
281
282#: ../../library/socket.rst:290
283# 616e56fdfc4b4448becdf7a72750d6b8
284msgid "TIPC related constants, matching the ones exported by the C socket API. See the TIPC documentation for more information."
285msgstr ""
286
287#: ../../library/socket.rst:296
288# 25af97962a14423a9892e71de631222f
289msgid "This constant contains a boolean value which indicates if IPv6 is supported on this platform."
290msgstr ""
291
292#: ../../library/socket.rst:301
293# 362a45435dec4d58bd5fea524321365c
294msgid "Functions"
295msgstr ""
296
297#: ../../library/socket.rst:304
298# 835ebd3f13df480f89912e958e4d7d81
299msgid "Creating sockets"
300msgstr ""
301
302#: ../../library/socket.rst:306
303# 753ee6a7680b4931ae38bc074cb63167
304msgid "The following functions all create :ref:`socket objects <socket-objects>`."
305msgstr ""
306
307#: ../../library/socket.rst:311
308# 01fd05421dde4008ad2fbe3acd359b22
309msgid "Create a new socket using the given address family, socket type and protocol number.  The address family should be :const:`AF_INET` (the default), :const:`AF_INET6`, :const:`AF_UNIX`, :const:`AF_CAN` or :const:`AF_RDS`. The socket type should be :const:`SOCK_STREAM` (the default), :const:`SOCK_DGRAM`, :const:`SOCK_RAW` or perhaps one of the other ``SOCK_`` constants. The protocol number is usually zero and may be omitted in that case or :const:`CAN_RAW` in case the address family is :const:`AF_CAN`."
310msgstr ""
311
312#: ../../library/socket.rst:319
313#: ../../library/socket.rst:319
314# 3401694d32bb4f9081d0274ac0c79ac1
315# c27cbef8d1094640ac3057b51518b17f
316msgid "The AF_CAN family was added. The AF_RDS family was added."
317msgstr ""
318
319#: ../../library/socket.rst:326
320# 152d725f41544ad6ad60b98bc9b546c3
321msgid "Build a pair of connected socket objects using the given address family, socket type, and protocol number.  Address family, socket type, and protocol number are as for the :func:`.socket` function above. The default family is :const:`AF_UNIX` if defined on the platform; otherwise, the default is :const:`AF_INET`. Availability: Unix."
322msgstr ""
323
324#: ../../library/socket.rst:332
325#: ../../library/socket.rst:332
326# f043ae2a027d42348c1cf94a789360d1
327# 29e4cd5fc3f14c4482de1c86601cbcf3
328msgid "The returned socket objects now support the whole socket API, rather than a subset."
329msgstr ""
330
331#: ../../library/socket.rst:339
332# 449eb6e3756e4738b87c8cbf7e881f9a
333msgid "Connect to a TCP service listening on the Internet *address* (a 2-tuple ``(host, port)``), and return the socket object.  This is a higher-level function than :meth:`socket.connect`: if *host* is a non-numeric hostname, it will try to resolve it for both :data:`AF_INET` and :data:`AF_INET6`, and then try to connect to all possible addresses in turn until a connection succeeds.  This makes it easy to write clients that are compatible to both IPv4 and IPv6."
334msgstr ""
335
336#: ../../library/socket.rst:347
337# cdb44a8c3cdf4796a12d7b3d187a6eb3
338msgid "Passing the optional *timeout* parameter will set the timeout on the socket instance before attempting to connect.  If no *timeout* is supplied, the global default timeout setting returned by :func:`getdefaulttimeout` is used."
339msgstr ""
340
341#: ../../library/socket.rst:352
342# dc53c6683e1d4da78e5f7fc3743a78a2
343msgid "If supplied, *source_address* must be a 2-tuple ``(host, port)`` for the socket to bind to as its source address before connecting.  If host or port are '' or 0 respectively the OS default behavior will be used."
344msgstr ""
345
346#: ../../library/socket.rst:356
347#: ../../library/socket.rst:356
348# cb83de96360d4e0c99b8102107afcc2d
349# 1819757f05474ac09855e9cd02b8979c
350msgid "*source_address* was added."
351msgstr ""
352
353#: ../../library/socket.rst:359
354#: ../../library/socket.rst:359
355# 6c9d7f3f9ade4eeea80dfb149ee622b7
356# e130458cea094d21968dc29c97b1a85d
357msgid "support for the :keyword:`with` statement was added."
358msgstr ""
359
360#: ../../library/socket.rst:365
361# d7d789a65eb54041bdbe10afdd39ee16
362msgid "Duplicate the file descriptor *fd* (an integer as returned by a file object's :meth:`fileno` method) and build a socket object from the result.  Address family, socket type and protocol number are as for the :func:`.socket` function above. The file descriptor should refer to a socket, but this is not checked --- subsequent operations on the object may fail if the file descriptor is invalid. This function is rarely needed, but can be used to get or set socket options on a socket passed to a program as standard input or output (such as a server started by the Unix inet daemon).  The socket is assumed to be in blocking mode."
363msgstr ""
364
365#: ../../library/socket.rst:377
366# ca61177b87d54d7793dfde97f4947a00
367msgid "Instantiate a socket from data obtained from the :meth:`socket.share` method.  The socket is assumed to be in blocking mode."
368msgstr ""
369
370#: ../../library/socket.rst:380
371#: ../../library/socket.rst:1138
372# 72a929a423ba4193aa0ab137386f501b
373# 9844d838e42046658498e904bd7478bb
374msgid "Availability: Windows."
375msgstr ""
376
377#: ../../library/socket.rst:387
378# a4955338259c4563b747e62cf5dbb64c
379msgid "This is a Python type object that represents the socket object type. It is the same as ``type(socket(...))``."
380msgstr ""
381
382#: ../../library/socket.rst:392
383# dbaa8586481843c79efac190a41e8fcd
384msgid "Other functions"
385msgstr ""
386
387#: ../../library/socket.rst:394
388# 64e4d449642c45e991258e31301ccd9f
389msgid "The :mod:`socket` module also offers various network-related services:"
390msgstr ""
391
392#: ../../library/socket.rst:399
393# da95fc2fbc8f4abab60e3b277feef5cd
394msgid "Translate the *host*/*port* argument into a sequence of 5-tuples that contain all the necessary arguments for creating a socket connected to that service. *host* is a domain name, a string representation of an IPv4/v6 address or ``None``. *port* is a string service name such as ``'http'``, a numeric port number or ``None``.  By passing ``None`` as the value of *host* and *port*, you can pass ``NULL`` to the underlying C API."
395msgstr ""
396
397#: ../../library/socket.rst:406
398# 489143df472e4e859ef3ab7f529b9a80
399msgid "The *family*, *type* and *proto* arguments can be optionally specified in order to narrow the list of addresses returned.  Passing zero as a value for each of these arguments selects the full range of results. The *flags* argument can be one or several of the ``AI_*`` constants, and will influence how results are computed and returned. For example, :const:`AI_NUMERICHOST` will disable domain name resolution and will raise an error if *host* is a domain name."
400msgstr ""
401
402#: ../../library/socket.rst:414
403# d1e76ee0fdc14e21b0a6820244e4d0ac
404msgid "The function returns a list of 5-tuples with the following structure:"
405msgstr ""
406
407#: ../../library/socket.rst:416
408# c2118a5739b04e3d9e89ffdf933f848c
409msgid "``(family, type, proto, canonname, sockaddr)``"
410msgstr ""
411
412#: ../../library/socket.rst:418
413# 7febe568470a4942a2c2dd356940b655
414msgid "In these tuples, *family*, *type*, *proto* are all integers and are meant to be passed to the :func:`.socket` function.  *canonname* will be a string representing the canonical name of the *host* if :const:`AI_CANONNAME` is part of the *flags* argument; else *canonname* will be empty.  *sockaddr* is a tuple describing a socket address, whose format depends on the returned *family* (a ``(address, port)`` 2-tuple for :const:`AF_INET`, a ``(address, port, flow info, scope id)`` 4-tuple for :const:`AF_INET6`), and is meant to be passed to the :meth:`socket.connect` method."
415msgstr ""
416
417#: ../../library/socket.rst:428
418# be7b0aa0798b4b8da184a7cf9f72232b
419msgid "The following example fetches address information for a hypothetical TCP connection to ``www.python.org`` on port 80 (results may differ on your system if IPv6 isn't enabled)::"
420msgstr ""
421
422#: ../../library/socket.rst:436
423#: ../../library/socket.rst:436
424# cb89a38f99fc410d9b8ef7ba3842faf1
425# ec16915d80054df3a9785e36eea0046d
426msgid "parameters can now be passed as single keyword arguments."
427msgstr ""
428
429#: ../../library/socket.rst:441
430# 53615f9f9a514d4e91a5a6c4d85de182
431msgid "Return a fully qualified domain name for *name*. If *name* is omitted or empty, it is interpreted as the local host.  To find the fully qualified name, the hostname returned by :func:`gethostbyaddr` is checked, followed by aliases for the host, if available.  The first name which includes a period is selected.  In case no fully qualified domain name is available, the hostname as returned by :func:`gethostname` is returned."
432msgstr ""
433
434#: ../../library/socket.rst:451
435# 0eeaa94d5dd549d0b8488287730b7a36
436msgid "Translate a host name to IPv4 address format.  The IPv4 address is returned as a string, such as  ``'100.50.200.5'``.  If the host name is an IPv4 address itself it is returned unchanged.  See :func:`gethostbyname_ex` for a more complete interface. :func:`gethostbyname` does not support IPv6 name resolution, and :func:`getaddrinfo` should be used instead for IPv4/v6 dual stack support."
437msgstr ""
438
439#: ../../library/socket.rst:460
440# dd655c91490845618bfe2a8a55e8b73d
441msgid "Translate a host name to IPv4 address format, extended interface. Return a triple ``(hostname, aliaslist, ipaddrlist)`` where *hostname* is the primary host name responding to the given *ip_address*, *aliaslist* is a (possibly empty) list of alternative host names for the same address, and *ipaddrlist* is a list of IPv4 addresses for the same interface on the same host (often but not always a single address). :func:`gethostbyname_ex` does not support IPv6 name resolution, and :func:`getaddrinfo` should be used instead for IPv4/v6 dual stack support."
442msgstr ""
443
444#: ../../library/socket.rst:472
445# 73e962c3b8a84a1483e8c26d4e210862
446msgid "Return a string containing the hostname of the machine where  the Python interpreter is currently executing."
447msgstr ""
448
449#: ../../library/socket.rst:475
450# f9b3d54e89994c15b1eef44bf705b4ba
451msgid "If you want to know the current machine's IP address, you may want to use ``gethostbyname(gethostname())``. This operation assumes that there is a valid address-to-host mapping for the host, and the assumption does not always hold."
452msgstr ""
453
454#: ../../library/socket.rst:480
455# 4ba246d1f849474d86bc633a1da6264e
456msgid "Note: :func:`gethostname` doesn't always return the fully qualified domain name; use ``getfqdn()`` (see above)."
457msgstr ""
458
459#: ../../library/socket.rst:486
460# cc34823a4f2d4e3284258a2109c11cac
461msgid "Return a triple ``(hostname, aliaslist, ipaddrlist)`` where *hostname* is the primary host name responding to the given *ip_address*, *aliaslist* is a (possibly empty) list of alternative host names for the same address, and *ipaddrlist* is a list of IPv4/v6 addresses for the same interface on the same host (most likely containing only a single address). To find the fully qualified domain name, use the function :func:`getfqdn`. :func:`gethostbyaddr` supports both IPv4 and IPv6."
462msgstr ""
463
464#: ../../library/socket.rst:497
465# 4be3c21ed1bf4d5faec1e42877dd9877
466msgid "Translate a socket address *sockaddr* into a 2-tuple ``(host, port)``. Depending on the settings of *flags*, the result can contain a fully-qualified domain name or numeric address representation in *host*.  Similarly, *port* can contain a string port name or a numeric port number."
467msgstr ""
468
469#: ../../library/socket.rst:505
470# f2b5ad4679104aafb1abe480034a5ed3
471msgid "Translate an Internet protocol name (for example, ``'icmp'``) to a constant suitable for passing as the (optional) third argument to the :func:`.socket` function.  This is usually only needed for sockets opened in \"raw\" mode (:const:`SOCK_RAW`); for the normal socket modes, the correct protocol is chosen automatically if the protocol is omitted or zero."
472msgstr ""
473
474#: ../../library/socket.rst:514
475# 39f75d9eb9264692918f671d6be390ec
476msgid "Translate an Internet service name and protocol name to a port number for that service.  The optional protocol name, if given, should be ``'tcp'`` or ``'udp'``, otherwise any protocol will match."
477msgstr ""
478
479#: ../../library/socket.rst:521
480# dfa9f40b690d43d28e0e8c17f46d558d
481msgid "Translate an Internet port number and protocol name to a service name for that service.  The optional protocol name, if given, should be ``'tcp'`` or ``'udp'``, otherwise any protocol will match."
482msgstr ""
483
484#: ../../library/socket.rst:528
485# 6feb402444d24f65abaaf1abffed0706
486msgid "Convert 32-bit positive integers from network to host byte order.  On machines where the host byte order is the same as network byte order, this is a no-op; otherwise, it performs a 4-byte swap operation."
487msgstr ""
488
489#: ../../library/socket.rst:535
490# 51d2994311c940e98aff17b5e3eceb59
491msgid "Convert 16-bit positive integers from network to host byte order.  On machines where the host byte order is the same as network byte order, this is a no-op; otherwise, it performs a 2-byte swap operation."
492msgstr ""
493
494#: ../../library/socket.rst:542
495# 02fc05e64a7a4e179f851a8cd5551949
496msgid "Convert 32-bit positive integers from host to network byte order.  On machines where the host byte order is the same as network byte order, this is a no-op; otherwise, it performs a 4-byte swap operation."
497msgstr ""
498
499#: ../../library/socket.rst:549
500# 2da3fa52c4c844c8989fa36a226813cc
501msgid "Convert 16-bit positive integers from host to network byte order.  On machines where the host byte order is the same as network byte order, this is a no-op; otherwise, it performs a 2-byte swap operation."
502msgstr ""
503
504#: ../../library/socket.rst:556
505# eb512910712e407581ddf05254dc1a6c
506msgid "Convert an IPv4 address from dotted-quad string format (for example, '123.45.67.89') to 32-bit packed binary format, as a bytes object four characters in length.  This is useful when conversing with a program that uses the standard C library and needs objects of type :c:type:`struct in_addr`, which is the C type for the 32-bit packed binary this function returns."
507msgstr ""
508
509#: ../../library/socket.rst:562
510# 77894199ecce4774b800266e819dcff8
511msgid ":func:`inet_aton` also accepts strings with less than three dots; see the Unix manual page :manpage:`inet(3)` for details."
512msgstr ""
513
514#: ../../library/socket.rst:565
515# 13590d08f6b147a9b20216248d62e41b
516msgid "If the IPv4 address string passed to this function is invalid, :exc:`OSError` will be raised. Note that exactly what is valid depends on the underlying C implementation of :c:func:`inet_aton`."
517msgstr ""
518
519#: ../../library/socket.rst:569
520# d7248f6947ed482b8f40956fd03f7bb0
521msgid ":func:`inet_aton` does not support IPv6, and :func:`inet_pton` should be used instead for IPv4/v6 dual stack support."
522msgstr ""
523
524#: ../../library/socket.rst:575
525# 88f4e89caa4b4927af52a0c7cec1b204
526msgid "Convert a 32-bit packed IPv4 address (a bytes object four characters in length) to its standard dotted-quad string representation (for example, '123.45.67.89').  This is useful when conversing with a program that uses the standard C library and needs objects of type :c:type:`struct in_addr`, which is the C type for the 32-bit packed binary data this function takes as an argument."
527msgstr ""
528
529#: ../../library/socket.rst:582
530# c7a0482928f04d11a6242e3cd1e59210
531msgid "If the byte sequence passed to this function is not exactly 4 bytes in length, :exc:`OSError` will be raised. :func:`inet_ntoa` does not support IPv6, and :func:`inet_ntop` should be used instead for IPv4/v6 dual stack support."
532msgstr ""
533
534#: ../../library/socket.rst:590
535# 6a777f795b1b4bd7954cd86b699287f1
536msgid "Convert an IP address from its family-specific string format to a packed, binary format. :func:`inet_pton` is useful when a library or network protocol calls for an object of type :c:type:`struct in_addr` (similar to :func:`inet_aton`) or :c:type:`struct in6_addr`."
537msgstr ""
538
539#: ../../library/socket.rst:595
540# 0c4640629bff48f09f1aa1ca94bf49de
541msgid "Supported values for *address_family* are currently :const:`AF_INET` and :const:`AF_INET6`. If the IP address string *ip_string* is invalid, :exc:`OSError` will be raised. Note that exactly what is valid depends on both the value of *address_family* and the underlying implementation of :c:func:`inet_pton`."
542msgstr ""
543
544#: ../../library/socket.rst:601
545#: ../../library/socket.rst:617
546# f0882252f5a54686a324dba6a32541f9
547# 935f331356564bd5a2bbe00d93d55640
548msgid "Availability: Unix (maybe not all platforms)."
549msgstr ""
550
551#: ../../library/socket.rst:606
552# 2f3ee5780b494362bbfcb75f7003955d
553msgid "Convert a packed IP address (a bytes object of some number of characters) to its standard, family-specific string representation (for example, ``'7.10.0.5'`` or ``'5aef:2b::8'``). :func:`inet_ntop` is useful when a library or network protocol returns an object of type :c:type:`struct in_addr` (similar to :func:`inet_ntoa`) or :c:type:`struct in6_addr`."
554msgstr ""
555
556#: ../../library/socket.rst:612
557# 8241745c11774039a84ac2f1ccff07c3
558msgid "Supported values for *address_family* are currently :const:`AF_INET` and :const:`AF_INET6`. If the string *packed_ip* is not the correct length for the specified address family, :exc:`ValueError` will be raised.  A :exc:`OSError` is raised for errors from the call to :func:`inet_ntop`."
559msgstr ""
560
561#: ../../library/socket.rst:628
562# a6fe65cc7b674e579c4ed5dfe76e6f32
563msgid "Return the total length, without trailing padding, of an ancillary data item with associated data of the given *length*.  This value can often be used as the buffer size for :meth:`~socket.recvmsg` to receive a single item of ancillary data, but :rfc:`3542` requires portable applications to use :func:`CMSG_SPACE` and thus include space for padding, even when the item will be the last in the buffer.  Raises :exc:`OverflowError` if *length* is outside the permissible range of values."
564msgstr ""
565
566#: ../../library/socket.rst:637
567#: ../../library/socket.rst:658
568#: ../../library/socket.rst:959
569#: ../../library/socket.rst:996
570#: ../../library/socket.rst:1080
571# dcda93aaf72f45678c4eda611aea023d
572# 92c323796ea94a588a30005d363bb08b
573# eb26b0bbf1d74685a8e1257cee7d0066
574# 0747488eeddd4554a4bf6417c57bb72b
575# 53eea693d11149469d5673a5fb8ce6c0
576msgid "Availability: most Unix platforms, possibly others."
577msgstr ""
578
579#: ../../library/socket.rst:644
580# 0f01b2f732fe469a8b1ab634e996af97
581msgid "Return the buffer size needed for :meth:`~socket.recvmsg` to receive an ancillary data item with associated data of the given *length*, along with any trailing padding.  The buffer space needed to receive multiple items is the sum of the :func:`CMSG_SPACE` values for their associated data lengths.  Raises :exc:`OverflowError` if *length* is outside the permissible range of values."
582msgstr ""
583
584#: ../../library/socket.rst:652
585# 79b7af29103f4afdb3e62d6818ad1e2d
586msgid "Note that some systems might support ancillary data without providing this function.  Also note that setting the buffer size using the results of this function may not precisely limit the amount of ancillary data that can be received, since additional data may be able to fit into the padding area."
587msgstr ""
588
589#: ../../library/socket.rst:665
590# 7336abb70ff24b9091bf7758b23634d9
591msgid "Return the default timeout in seconds (float) for new socket objects. A value of ``None`` indicates that new socket objects have no timeout. When the socket module is first imported, the default is ``None``."
592msgstr ""
593
594#: ../../library/socket.rst:672
595# 94e8cf3e042246f4a04f0d1456cfc3cd
596msgid "Set the default timeout in seconds (float) for new socket objects.  When the socket module is first imported, the default is ``None``.  See :meth:`~socket.settimeout` for possible values and their respective meanings."
597msgstr ""
598
599#: ../../library/socket.rst:680
600# 4244f00c68d746358130362fb9c7288b
601msgid "Set the machine's hostname to *name*.  This will raise a :exc:`OSError` if you don't have enough rights."
602msgstr ""
603
604#: ../../library/socket.rst:683
605#: ../../library/socket.rst:694
606#: ../../library/socket.rst:705
607#: ../../library/socket.rst:716
608# 7ff272ba99f34ea7abe9a3ca38af8ef0
609# 9b5e7820356d43e39df8686108cceab4
610# 81051ee7ca9147c8a5598a69608a8ee0
611# ec27d109f63d43bfaea94f5ff4095dd2
612msgid "Availability: Unix."
613msgstr ""
614
615#: ../../library/socket.rst:690
616# 499186d8a19e424196679c97e8332bd0
617msgid "Return a list of network interface information (index int, name string) tuples. :exc:`OSError` if the system call fails."
618msgstr ""
619
620#: ../../library/socket.rst:701
621# c4ebcac498a44d64a88b5ee61b65dae1
622msgid "Return a network interface index number corresponding to an interface name. :exc:`OSError` if no interface with the given name exists."
623msgstr ""
624
625#: ../../library/socket.rst:712
626# 8a227c2f2674493aa34f32046016bee1
627msgid "Return a network interface name corresponding to a interface index number. :exc:`OSError` if no interface with the given index exists."
628msgstr ""
629
630#: ../../library/socket.rst:724
631# 11b8514d5b9945a58292ba4d238f92da
632msgid "Socket Objects"
633msgstr ""
634
635#: ../../library/socket.rst:726
636# 313bd9e858854a2f9f183b8cf6f2b2b1
637msgid "Socket objects have the following methods.  Except for :meth:`~socket.makefile`, these correspond to Unix system calls applicable to sockets."
638msgstr ""
639
640#: ../../library/socket.rst:733
641# 4030753db7f24dcfaa5c3f54d95b64e7
642msgid "Accept a connection. The socket must be bound to an address and listening for connections. The return value is a pair ``(conn, address)`` where *conn* is a *new* socket object usable to send and receive data on the connection, and *address* is the address bound to the socket on the other end of the connection."
643msgstr ""
644
645#: ../../library/socket.rst:741
646# d64015cae7e2423d926ad0f54eb4e8e6
647msgid "Bind the socket to *address*.  The socket must not already be bound. (The format of *address* depends on the address family --- see above.)"
648msgstr ""
649
650#: ../../library/socket.rst:747
651# 0af312f00fa14d46856f5f106c7fc889
652msgid "Mark the socket closed.  The underlying system resource (e.g. a file descriptor) is also closed when all file objects from :meth:`makefile()` are closed.  Once that happens, all future operations on the socket object will fail. The remote end will receive no more data (after queued data is flushed)."
653msgstr ""
654
655#: ../../library/socket.rst:753
656# c1dcb96692954d88af9f4164f5ab17dd
657msgid "Sockets are automatically closed when they are garbage-collected, but it is recommended to :meth:`close` them explicitly, or to use a :keyword:`with` statement around them."
658msgstr ""
659
660#: ../../library/socket.rst:758
661# 8e55a10cfc0b4eda9e15f598e2b071d8
662msgid ":meth:`close()` releases the resource associated with a connection but does not necessarily close the connection immediately.  If you want to close the connection in a timely fashion, call :meth:`shutdown()` before :meth:`close()`."
663msgstr ""
664
665#: ../../library/socket.rst:766
666# 13f2a08413d14fe59c1f42cd9273eb48
667msgid "Connect to a remote socket at *address*. (The format of *address* depends on the address family --- see above.)"
668msgstr ""
669
670#: ../../library/socket.rst:772
671# 82a7a5b413ea4b0a97175133f1e3f216
672msgid "Like ``connect(address)``, but return an error indicator instead of raising an exception for errors returned by the C-level :c:func:`connect` call (other problems, such as \"host not found,\" can still raise exceptions).  The error indicator is ``0`` if the operation succeeded, otherwise the value of the :c:data:`errno` variable.  This is useful to support, for example, asynchronous connects."
673msgstr ""
674
675#: ../../library/socket.rst:782
676# ff02c80cdc4a4c95bee3265b763f0fff
677msgid "Put the socket object into closed state without actually closing the underlying file descriptor.  The file descriptor is returned, and can be reused for other purposes."
678msgstr ""
679
680#: ../../library/socket.rst:791
681# 8b867688b5aa4a2c96070cf7f36b2c58
682msgid "Return the socket's file descriptor (a small integer).  This is useful with :func:`select.select`."
683msgstr ""
684
685#: ../../library/socket.rst:794
686# 2fe6d2fd6a08493c99a03a2ea0a88f75
687msgid "Under Windows the small integer returned by this method cannot be used where a file descriptor can be used (such as :func:`os.fdopen`).  Unix does not have this limitation."
688msgstr ""
689
690#: ../../library/socket.rst:801
691# b9877063f0fb4d909eafa1ffae517edb
692msgid "Return the remote address to which the socket is connected.  This is useful to find out the port number of a remote IPv4/v6 socket, for instance. (The format of the address returned depends on the address family --- see above.)  On some systems this function is not supported."
693msgstr ""
694
695#: ../../library/socket.rst:809
696# 89287c66e835478180c05d27af2b68da
697msgid "Return the socket's own address.  This is useful to find out the port number of an IPv4/v6 socket, for instance. (The format of the address returned depends on the address family --- see above.)"
698msgstr ""
699
700#: ../../library/socket.rst:816
701# 62d1a36b7cde46efb1cf2b29567f232b
702msgid "Return the value of the given socket option (see the Unix man page :manpage:`getsockopt(2)`).  The needed symbolic constants (:const:`SO_\\*` etc.) are defined in this module.  If *buflen* is absent, an integer option is assumed and its integer value is returned by the function.  If *buflen* is present, it specifies the maximum length of the buffer used to receive the option in, and this buffer is returned as a bytes object.  It is up to the caller to decode the contents of the buffer (see the optional built-in module :mod:`struct` for a way to decode C structures encoded as byte strings)."
703msgstr ""
704
705#: ../../library/socket.rst:828
706# b8ec909496b94c138472500bc131d5ad
707msgid "Return the timeout in seconds (float) associated with socket operations, or ``None`` if no timeout is set.  This reflects the last call to :meth:`setblocking` or :meth:`settimeout`."
708msgstr ""
709
710#: ../../library/socket.rst:835
711# 41b163af889b42239d009ed83709675f
712msgid "Windows"
713msgstr ""
714
715#: ../../library/socket.rst:837
716# 04d06913140945bd8d93157b0e7c3ccd
717msgid "The :meth:`ioctl` method is a limited interface to the WSAIoctl system interface.  Please refer to the `Win32 documentation <http://msdn.microsoft.com/en-us/library/ms741621%28VS.85%29.aspx>`_ for more information."
718msgstr ""
719
720#: ../../library/socket.rst:842
721# 7a70db30b7b9461688295ab94800240a
722msgid "On other platforms, the generic :func:`fcntl.fcntl` and :func:`fcntl.ioctl` functions may be used; they accept a socket object as their first argument."
723msgstr ""
724
725#: ../../library/socket.rst:847
726# d42450bce7844b2d94d4be07dab670fb
727msgid "Listen for connections made to the socket.  The *backlog* argument specifies the maximum number of queued connections and should be at least 0; the maximum value is system-dependent (usually 5), the minimum value is forced to 0."
728msgstr ""
729
730#: ../../library/socket.rst:857
731# 9b5f4c10ac4a46879b3b1d300ec5fbe4
732msgid "Return a :term:`file object` associated with the socket.  The exact returned type depends on the arguments given to :meth:`makefile`.  These arguments are interpreted the same way as by the built-in :func:`open` function."
733msgstr ""
734
735#: ../../library/socket.rst:861
736# 69d19d0595284b179729781630dbe4a2
737msgid "The socket must be in blocking mode; it can have a timeout, but the file object's internal buffer may end up in a inconsistent state if a timeout occurs."
738msgstr ""
739
740#: ../../library/socket.rst:865
741# da3712a18bf74483aedfc59cc32e3a77
742msgid "Closing the file object returned by :meth:`makefile` won't close the original socket unless all other file objects have been closed and :meth:`socket.close` has been called on the socket object."
743msgstr ""
744
745#: ../../library/socket.rst:871
746# 0db155f75b034bc3a62f246f3a108881
747msgid "On Windows, the file-like object created by :meth:`makefile` cannot be used where a file object with a file descriptor is expected, such as the stream arguments of :meth:`subprocess.Popen`."
748msgstr ""
749
750#: ../../library/socket.rst:878
751# d7385b182ced46be8ed5914f186a11c2
752msgid "Receive data from the socket.  The return value is a bytes object representing the data received.  The maximum amount of data to be received at once is specified by *bufsize*.  See the Unix manual page :manpage:`recv(2)` for the meaning of the optional argument *flags*; it defaults to zero."
753msgstr ""
754
755#: ../../library/socket.rst:885
756# 3a21a12c1d6b4bef949750bb63ed4d76
757msgid "For best match with hardware and network realities, the value of  *bufsize* should be a relatively small power of 2, for example, 4096."
758msgstr ""
759
760#: ../../library/socket.rst:891
761# 2147fdb7cd1e4c1f8b71739b40dc3e4f
762msgid "Receive data from the socket.  The return value is a pair ``(bytes, address)`` where *bytes* is a bytes object representing the data received and *address* is the address of the socket sending the data.  See the Unix manual page :manpage:`recv(2)` for the meaning of the optional argument *flags*; it defaults to zero. (The format of *address* depends on the address family --- see above.)"
763msgstr ""
764
765#: ../../library/socket.rst:900
766# 6306a7f1169e464bb895df3d2b489a22
767msgid "Receive normal data (up to *bufsize* bytes) and ancillary data from the socket.  The *ancbufsize* argument sets the size in bytes of the internal buffer used to receive the ancillary data; it defaults to 0, meaning that no ancillary data will be received.  Appropriate buffer sizes for ancillary data can be calculated using :func:`CMSG_SPACE` or :func:`CMSG_LEN`, and items which do not fit into the buffer might be truncated or discarded.  The *flags* argument defaults to 0 and has the same meaning as for :meth:`recv`."
768msgstr ""
769
770#: ../../library/socket.rst:910
771# 29b9c5ed6e0643329761fa30d09e63a7
772msgid "The return value is a 4-tuple: ``(data, ancdata, msg_flags, address)``.  The *data* item is a :class:`bytes` object holding the non-ancillary data received.  The *ancdata* item is a list of zero or more tuples ``(cmsg_level, cmsg_type, cmsg_data)`` representing the ancillary data (control messages) received: *cmsg_level* and *cmsg_type* are integers specifying the protocol level and protocol-specific type respectively, and *cmsg_data* is a :class:`bytes` object holding the associated data.  The *msg_flags* item is the bitwise OR of various flags indicating conditions on the received message; see your system documentation for details. If the receiving socket is unconnected, *address* is the address of the sending socket, if available; otherwise, its value is unspecified."
773msgstr ""
774
775#: ../../library/socket.rst:924
776# 83ccaf03fd4e4b92a801154e5a6edec2
777msgid "On some systems, :meth:`sendmsg` and :meth:`recvmsg` can be used to pass file descriptors between processes over an :const:`AF_UNIX` socket.  When this facility is used (it is often restricted to :const:`SOCK_STREAM` sockets), :meth:`recvmsg` will return, in its ancillary data, items of the form ``(socket.SOL_SOCKET, socket.SCM_RIGHTS, fds)``, where *fds* is a :class:`bytes` object representing the new file descriptors as a binary array of the native C :c:type:`int` type.  If :meth:`recvmsg` raises an exception after the system call returns, it will first attempt to close any file descriptors received via this mechanism."
778msgstr ""
779
780#: ../../library/socket.rst:935
781# bb2310be58de456f8237f2c1be1dd110
782msgid "Some systems do not indicate the truncated length of ancillary data items which have been only partially received.  If an item appears to extend beyond the end of the buffer, :meth:`recvmsg` will issue a :exc:`RuntimeWarning`, and will return the part of it which is inside the buffer provided it has not been truncated before the start of its associated data."
783msgstr ""
784
785#: ../../library/socket.rst:942
786# a324dc99a25a4559b7da26b6d8201c70
787msgid "On systems which support the :const:`SCM_RIGHTS` mechanism, the following function will receive up to *maxfds* file descriptors, returning the message data and a list containing the descriptors (while ignoring unexpected conditions such as unrelated control messages being received).  See also :meth:`sendmsg`. ::"
788msgstr ""
789
790#: ../../library/socket.rst:966
791# 79276ab1c2d546b0aa1221553610b4c9
792msgid "Receive normal data and ancillary data from the socket, behaving as :meth:`recvmsg` would, but scatter the non-ancillary data into a series of buffers instead of returning a new bytes object.  The *buffers* argument must be an iterable of objects that export writable buffers (e.g. :class:`bytearray` objects); these will be filled with successive chunks of the non-ancillary data until it has all been written or there are no more buffers.  The operating system may set a limit (:func:`~os.sysconf` value ``SC_IOV_MAX``) on the number of buffers that can be used.  The *ancbufsize* and *flags* arguments have the same meaning as for :meth:`recvmsg`."
793msgstr ""
794
795#: ../../library/socket.rst:977
796# e4c9a4057493418192eea01d2b0e2d27
797msgid "The return value is a 4-tuple: ``(nbytes, ancdata, msg_flags, address)``, where *nbytes* is the total number of bytes of non-ancillary data written into the buffers, and *ancdata*, *msg_flags* and *address* are the same as for :meth:`recvmsg`."
798msgstr ""
799
800#: ../../library/socket.rst:982
801# 33927a201c834cf28ad364a61ed77688
802msgid "Example::"
803msgstr ""
804
805#: ../../library/socket.rst:1003
806# d2f9afbd5da8450ba447c4d7e8b89d25
807msgid "Receive data from the socket, writing it into *buffer* instead of creating a new bytestring.  The return value is a pair ``(nbytes, address)`` where *nbytes* is the number of bytes received and *address* is the address of the socket sending the data.  See the Unix manual page :manpage:`recv(2)` for the meaning of the optional argument *flags*; it defaults to zero.  (The format of *address* depends on the address family --- see above.)"
808msgstr ""
809
810#: ../../library/socket.rst:1013
811# 9ca864b9a4674e5e8964b3f93d948a24
812msgid "Receive up to *nbytes* bytes from the socket, storing the data into a buffer rather than creating a new bytestring.  If *nbytes* is not specified (or 0), receive up to the size available in the given buffer.  Returns the number of bytes received.  See the Unix manual page :manpage:`recv(2)` for the meaning of the optional argument *flags*; it defaults to zero."
813msgstr ""
814
815#: ../../library/socket.rst:1022
816# d3ed2dbaf81c42a79db2fa782c446da8
817msgid "Send data to the socket.  The socket must be connected to a remote socket.  The optional *flags* argument has the same meaning as for :meth:`recv` above. Returns the number of bytes sent. Applications are responsible for checking that all data has been sent; if only some of the data was transmitted, the application needs to attempt delivery of the remaining data. For further information on this topic, consult the :ref:`socket-howto`."
818msgstr ""
819
820#: ../../library/socket.rst:1032
821# f9c12d1cd4fc4149b84d555b22a7050c
822msgid "Send data to the socket.  The socket must be connected to a remote socket.  The optional *flags* argument has the same meaning as for :meth:`recv` above. Unlike :meth:`send`, this method continues to send data from *bytes* until either all data has been sent or an error occurs.  ``None`` is returned on success.  On error, an exception is raised, and there is no way to determine how much data, if any, was successfully sent."
823msgstr ""
824
825#: ../../library/socket.rst:1043
826# 467bf26a65a34f7aad2870bdd916c8eb
827msgid "Send data to the socket.  The socket should not be connected to a remote socket, since the destination socket is specified by *address*.  The optional *flags* argument has the same meaning as for :meth:`recv` above.  Return the number of bytes sent. (The format of *address* depends on the address family --- see above.)"
828msgstr ""
829
830#: ../../library/socket.rst:1052
831# 5c2bcc9768e8450bbba4e373c8be834f
832msgid "Send normal and ancillary data to the socket, gathering the non-ancillary data from a series of buffers and concatenating it into a single message.  The *buffers* argument specifies the non-ancillary data as an iterable of buffer-compatible objects (e.g. :class:`bytes` objects); the operating system may set a limit (:func:`~os.sysconf` value ``SC_IOV_MAX``) on the number of buffers that can be used.  The *ancdata* argument specifies the ancillary data (control messages) as an iterable of zero or more tuples ``(cmsg_level, cmsg_type, cmsg_data)``, where *cmsg_level* and *cmsg_type* are integers specifying the protocol level and protocol-specific type respectively, and *cmsg_data* is a buffer-compatible object holding the associated data.  Note that some systems (in particular, systems without :func:`CMSG_SPACE`) might support sending only one control message per call.  The *flags* argument defaults to 0 and has the same meaning as for :meth:`send`.  If *address* is …

Large files files are truncated, but you can click here to view the full file