# Copyright (C) 2001-2018, Python Software Foundation # For licence information, see README file. # msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2023-01-15 22:33+0100\n" "PO-Revision-Date: 2019-06-18 22:29+0200\n" "Last-Translator: Julien Palard \n" "Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Poedit 2.0.2\n" #: library/asyncio-protocol.rst:9 msgid "Transports and Protocols" msgstr "Transports et Protocoles" #: library/asyncio-protocol.rst:12 msgid "Preface" msgstr "" #: library/asyncio-protocol.rst:13 msgid "" "Transports and Protocols are used by the **low-level** event loop APIs such " "as :meth:`loop.create_connection`. They use callback-based programming " "style and enable high-performance implementations of network or IPC " "protocols (e.g. HTTP)." msgstr "" #: library/asyncio-protocol.rst:18 msgid "" "Essentially, transports and protocols should only be used in libraries and " "frameworks and never in high-level asyncio applications." msgstr "" #: library/asyncio-protocol.rst:22 msgid "This documentation page covers both `Transports`_ and `Protocols`_." msgstr "" #: library/asyncio-protocol.rst:25 msgid "Introduction" msgstr "Introduction" #: library/asyncio-protocol.rst:26 msgid "" "At the highest level, the transport is concerned with *how* bytes are " "transmitted, while the protocol determines *which* bytes to transmit (and to " "some extent when)." msgstr "" #: library/asyncio-protocol.rst:30 msgid "" "A different way of saying the same thing: a transport is an abstraction for " "a socket (or similar I/O endpoint) while a protocol is an abstraction for an " "application, from the transport's point of view." msgstr "" #: library/asyncio-protocol.rst:35 msgid "" "Yet another view is the transport and protocol interfaces together define an " "abstract interface for using network I/O and interprocess I/O." msgstr "" #: library/asyncio-protocol.rst:39 msgid "" "There is always a 1:1 relationship between transport and protocol objects: " "the protocol calls transport methods to send data, while the transport calls " "protocol methods to pass it data that has been received." msgstr "" #: library/asyncio-protocol.rst:44 msgid "" "Most of connection oriented event loop methods (such as :meth:`loop." "create_connection`) usually accept a *protocol_factory* argument used to " "create a *Protocol* object for an accepted connection, represented by a " "*Transport* object. Such methods usually return a tuple of ``(transport, " "protocol)``." msgstr "" #: library/asyncio-protocol.rst:51 msgid "Contents" msgstr "Sommaire" #: library/asyncio-protocol.rst:52 msgid "This documentation page contains the following sections:" msgstr "" #: library/asyncio-protocol.rst:54 msgid "" "The `Transports`_ section documents asyncio :class:`BaseTransport`, :class:" "`ReadTransport`, :class:`WriteTransport`, :class:`Transport`, :class:" "`DatagramTransport`, and :class:`SubprocessTransport` classes." msgstr "" #: library/asyncio-protocol.rst:59 msgid "" "The `Protocols`_ section documents asyncio :class:`BaseProtocol`, :class:" "`Protocol`, :class:`BufferedProtocol`, :class:`DatagramProtocol`, and :class:" "`SubprocessProtocol` classes." msgstr "" #: library/asyncio-protocol.rst:63 msgid "" "The `Examples`_ section showcases how to work with transports, protocols, " "and low-level event loop APIs." msgstr "" #: library/asyncio-protocol.rst:70 msgid "Transports" msgstr "Transports" #: library/asyncio-protocol.rst:72 msgid "**Source code:** :source:`Lib/asyncio/transports.py`" msgstr "" #: library/asyncio-protocol.rst:76 msgid "" "Transports are classes provided by :mod:`asyncio` in order to abstract " "various kinds of communication channels." msgstr "" #: library/asyncio-protocol.rst:79 msgid "" "Transport objects are always instantiated by an :ref:`asyncio event loop " "`." msgstr "" #: library/asyncio-protocol.rst:82 msgid "" "asyncio implements transports for TCP, UDP, SSL, and subprocess pipes. The " "methods available on a transport depend on the transport's kind." msgstr "" #: library/asyncio-protocol.rst:85 msgid "" "The transport classes are :ref:`not thread safe `." msgstr "" #: library/asyncio-protocol.rst:89 msgid "Transports Hierarchy" msgstr "Hiérarchie des transports" #: library/asyncio-protocol.rst:93 msgid "" "Base class for all transports. Contains methods that all asyncio transports " "share." msgstr "" #: library/asyncio-protocol.rst:98 msgid "A base transport for write-only connections." msgstr "" #: library/asyncio-protocol.rst:100 msgid "" "Instances of the *WriteTransport* class are returned from the :meth:`loop." "connect_write_pipe` event loop method and are also used by subprocess-" "related methods like :meth:`loop.subprocess_exec`." msgstr "" #: library/asyncio-protocol.rst:107 msgid "A base transport for read-only connections." msgstr "" #: library/asyncio-protocol.rst:109 msgid "" "Instances of the *ReadTransport* class are returned from the :meth:`loop." "connect_read_pipe` event loop method and are also used by subprocess-related " "methods like :meth:`loop.subprocess_exec`." msgstr "" #: library/asyncio-protocol.rst:116 msgid "" "Interface representing a bidirectional transport, such as a TCP connection." msgstr "" #: library/asyncio-protocol.rst:119 msgid "" "The user does not instantiate a transport directly; they call a utility " "function, passing it a protocol factory and other information necessary to " "create the transport and protocol." msgstr "" #: library/asyncio-protocol.rst:123 msgid "" "Instances of the *Transport* class are returned from or used by event loop " "methods like :meth:`loop.create_connection`, :meth:`loop." "create_unix_connection`, :meth:`loop.create_server`, :meth:`loop.sendfile`, " "etc." msgstr "" #: library/asyncio-protocol.rst:131 msgid "A transport for datagram (UDP) connections." msgstr "" #: library/asyncio-protocol.rst:133 msgid "" "Instances of the *DatagramTransport* class are returned from the :meth:`loop." "create_datagram_endpoint` event loop method." msgstr "" #: library/asyncio-protocol.rst:139 msgid "" "An abstraction to represent a connection between a parent and its child OS " "process." msgstr "" #: library/asyncio-protocol.rst:142 msgid "" "Instances of the *SubprocessTransport* class are returned from event loop " "methods :meth:`loop.subprocess_shell` and :meth:`loop.subprocess_exec`." msgstr "" #: library/asyncio-protocol.rst:148 msgid "Base Transport" msgstr "Classe de base des Transports" #: library/asyncio-protocol.rst:152 msgid "Close the transport." msgstr "Ferme le transport." #: library/asyncio-protocol.rst:154 msgid "" "If the transport has a buffer for outgoing data, buffered data will be " "flushed asynchronously. No more data will be received. After all buffered " "data is flushed, the protocol's :meth:`protocol.connection_lost() " "` method will be called with :const:`None` as " "its argument. The transport should not be used once it is closed." msgstr "" #: library/asyncio-protocol.rst:164 msgid "Return ``True`` if the transport is closing or is closed." msgstr "" #: library/asyncio-protocol.rst:168 msgid "Return information about the transport or underlying resources it uses." msgstr "" #: library/asyncio-protocol.rst:171 msgid "" "*name* is a string representing the piece of transport-specific information " "to get." msgstr "" #: library/asyncio-protocol.rst:174 msgid "" "*default* is the value to return if the information is not available, or if " "the transport does not support querying it with the given third-party event " "loop implementation or on the current platform." msgstr "" #: library/asyncio-protocol.rst:179 msgid "" "For example, the following code attempts to get the underlying socket object " "of the transport::" msgstr "" #: library/asyncio-protocol.rst:186 msgid "Categories of information that can be queried on some transports:" msgstr "" #: library/asyncio-protocol.rst:188 msgid "socket:" msgstr "" #: library/asyncio-protocol.rst:190 msgid "" "``'peername'``: the remote address to which the socket is connected, result " "of :meth:`socket.socket.getpeername` (``None`` on error)" msgstr "" #: library/asyncio-protocol.rst:194 msgid "``'socket'``: :class:`socket.socket` instance" msgstr "``'socket'`` : Instance de :class:`socket.socket`" #: library/asyncio-protocol.rst:196 msgid "" "``'sockname'``: the socket's own address, result of :meth:`socket.socket." "getsockname`" msgstr "" #: library/asyncio-protocol.rst:199 msgid "SSL socket:" msgstr "Connecteur (*socket* en anglais) SSL :" #: library/asyncio-protocol.rst:201 msgid "" "``'compression'``: the compression algorithm being used as a string, or " "``None`` if the connection isn't compressed; result of :meth:`ssl.SSLSocket." "compression`" msgstr "" #: library/asyncio-protocol.rst:205 msgid "" "``'cipher'``: a three-value tuple containing the name of the cipher being " "used, the version of the SSL protocol that defines its use, and the number " "of secret bits being used; result of :meth:`ssl.SSLSocket.cipher`" msgstr "" #: library/asyncio-protocol.rst:210 msgid "" "``'peercert'``: peer certificate; result of :meth:`ssl.SSLSocket.getpeercert`" msgstr "" #: library/asyncio-protocol.rst:213 msgid "``'sslcontext'``: :class:`ssl.SSLContext` instance" msgstr "``sslcontext'`` : Instance de :class:`ssl.SSLContext`" #: library/asyncio-protocol.rst:215 msgid "" "``'ssl_object'``: :class:`ssl.SSLObject` or :class:`ssl.SSLSocket` instance" msgstr "" #: library/asyncio-protocol.rst:218 msgid "pipe:" msgstr "" #: library/asyncio-protocol.rst:220 msgid "``'pipe'``: pipe object" msgstr "``'pipe'`` : objet *pipe*" #: library/asyncio-protocol.rst:222 msgid "subprocess:" msgstr "sous-processus :" #: library/asyncio-protocol.rst:224 msgid "``'subprocess'``: :class:`subprocess.Popen` instance" msgstr "" #: library/asyncio-protocol.rst:228 msgid "Set a new protocol." msgstr "Change le protocole." #: library/asyncio-protocol.rst:230 msgid "" "Switching protocol should only be done when both protocols are documented to " "support the switch." msgstr "" #: library/asyncio-protocol.rst:235 msgid "Return the current protocol." msgstr "Renvoie le protocole courant." #: library/asyncio-protocol.rst:239 msgid "Read-only Transports" msgstr "Transports en lecture seule" #: library/asyncio-protocol.rst:243 msgid "Return ``True`` if the transport is receiving new data." msgstr "" #: library/asyncio-protocol.rst:249 msgid "" "Pause the receiving end of the transport. No data will be passed to the " "protocol's :meth:`protocol.data_received() ` method " "until :meth:`resume_reading` is called." msgstr "" #: library/asyncio-protocol.rst:253 msgid "" "The method is idempotent, i.e. it can be called when the transport is " "already paused or closed." msgstr "" #: library/asyncio-protocol.rst:259 msgid "" "Resume the receiving end. The protocol's :meth:`protocol.data_received() " "` method will be called once again if some data is " "available for reading." msgstr "" #: library/asyncio-protocol.rst:263 msgid "" "The method is idempotent, i.e. it can be called when the transport is " "already reading." msgstr "" #: library/asyncio-protocol.rst:269 msgid "Write-only Transports" msgstr "Transports en lecture/écriture" #: library/asyncio-protocol.rst:273 msgid "" "Close the transport immediately, without waiting for pending operations to " "complete. Buffered data will be lost. No more data will be received. The " "protocol's :meth:`protocol.connection_lost() ` " "method will eventually be called with :const:`None` as its argument." msgstr "" #: library/asyncio-protocol.rst:281 msgid "" "Return :const:`True` if the transport supports :meth:`~WriteTransport." "write_eof`, :const:`False` if not." msgstr "" #: library/asyncio-protocol.rst:286 msgid "Return the current size of the output buffer used by the transport." msgstr "" #: library/asyncio-protocol.rst:290 msgid "" "Get the *high* and *low* watermarks for write flow control. Return a tuple " "``(low, high)`` where *low* and *high* are positive number of bytes." msgstr "" #: library/asyncio-protocol.rst:294 msgid "Use :meth:`set_write_buffer_limits` to set the limits." msgstr "" #: library/asyncio-protocol.rst:300 msgid "Set the *high* and *low* watermarks for write flow control." msgstr "" #: library/asyncio-protocol.rst:302 msgid "" "These two values (measured in number of bytes) control when the protocol's :" "meth:`protocol.pause_writing() ` and :meth:" "`protocol.resume_writing() ` methods are " "called. If specified, the low watermark must be less than or equal to the " "high watermark. Neither *high* nor *low* can be negative." msgstr "" #: library/asyncio-protocol.rst:310 msgid "" ":meth:`~BaseProtocol.pause_writing` is called when the buffer size becomes " "greater than or equal to the *high* value. If writing has been paused, :meth:" "`~BaseProtocol.resume_writing` is called when the buffer size becomes less " "than or equal to the *low* value." msgstr "" #: library/asyncio-protocol.rst:315 msgid "" "The defaults are implementation-specific. If only the high watermark is " "given, the low watermark defaults to an implementation-specific value less " "than or equal to the high watermark. Setting *high* to zero forces *low* to " "zero as well, and causes :meth:`~BaseProtocol.pause_writing` to be called " "whenever the buffer becomes non-empty. Setting *low* to zero causes :meth:" "`~BaseProtocol.resume_writing` to be called only once the buffer is empty. " "Use of zero for either limit is generally sub-optimal as it reduces " "opportunities for doing I/O and computation concurrently." msgstr "" #: library/asyncio-protocol.rst:326 msgid "Use :meth:`~WriteTransport.get_write_buffer_limits` to get the limits." msgstr "" #: library/asyncio-protocol.rst:331 msgid "Write some *data* bytes to the transport." msgstr "Écrit des octets de *data* sur le transport." #: library/asyncio-protocol.rst:333 library/asyncio-protocol.rst:362 msgid "" "This method does not block; it buffers the data and arranges for it to be " "sent out asynchronously." msgstr "" #: library/asyncio-protocol.rst:338 msgid "" "Write a list (or any iterable) of data bytes to the transport. This is " "functionally equivalent to calling :meth:`write` on each element yielded by " "the iterable, but may be implemented more efficiently." msgstr "" #: library/asyncio-protocol.rst:345 msgid "" "Close the write end of the transport after flushing all buffered data. Data " "may still be received." msgstr "" #: library/asyncio-protocol.rst:348 msgid "" "This method can raise :exc:`NotImplementedError` if the transport (e.g. SSL) " "doesn't support half-closed connections." msgstr "" #: library/asyncio-protocol.rst:353 msgid "Datagram Transports" msgstr "Transports de datagrammes" #: library/asyncio-protocol.rst:357 msgid "" "Send the *data* bytes to the remote peer given by *addr* (a transport-" "dependent target address). If *addr* is :const:`None`, the data is sent to " "the target address given on transport creation." msgstr "" #: library/asyncio-protocol.rst:367 msgid "" "Close the transport immediately, without waiting for pending operations to " "complete. Buffered data will be lost. No more data will be received. The " "protocol's :meth:`protocol.connection_lost() ` " "method will eventually be called with :const:`None` as its argument." msgstr "" #: library/asyncio-protocol.rst:377 msgid "Subprocess Transports" msgstr "Transports vers des sous-processus" #: library/asyncio-protocol.rst:381 msgid "Return the subprocess process id as an integer." msgstr "" "Donne l'identifiant du sous processus sous la forme d'un nombre entier." #: library/asyncio-protocol.rst:385 msgid "" "Return the transport for the communication pipe corresponding to the integer " "file descriptor *fd*:" msgstr "" #: library/asyncio-protocol.rst:388 msgid "" "``0``: readable streaming transport of the standard input (*stdin*), or :" "const:`None` if the subprocess was not created with ``stdin=PIPE``" msgstr "" #: library/asyncio-protocol.rst:390 msgid "" "``1``: writable streaming transport of the standard output (*stdout*), or :" "const:`None` if the subprocess was not created with ``stdout=PIPE``" msgstr "" #: library/asyncio-protocol.rst:392 msgid "" "``2``: writable streaming transport of the standard error (*stderr*), or :" "const:`None` if the subprocess was not created with ``stderr=PIPE``" msgstr "" #: library/asyncio-protocol.rst:394 msgid "other *fd*: :const:`None`" msgstr "autre *fd* : :const:`None`" #: library/asyncio-protocol.rst:398 msgid "" "Return the subprocess return code as an integer or :const:`None` if it " "hasn't returned, which is similar to the :attr:`subprocess.Popen.returncode` " "attribute." msgstr "" #: library/asyncio-protocol.rst:404 msgid "Kill the subprocess." msgstr "Tue le sous-processus." #: library/asyncio-protocol.rst:406 msgid "" "On POSIX systems, the function sends SIGKILL to the subprocess. On Windows, " "this method is an alias for :meth:`terminate`." msgstr "" #: library/asyncio-protocol.rst:409 msgid "See also :meth:`subprocess.Popen.kill`." msgstr "" #: library/asyncio-protocol.rst:413 msgid "" "Send the *signal* number to the subprocess, as in :meth:`subprocess.Popen." "send_signal`." msgstr "" #: library/asyncio-protocol.rst:418 msgid "Stop the subprocess." msgstr "Termine le sous-processus." #: library/asyncio-protocol.rst:420 msgid "" "On POSIX systems, this method sends SIGTERM to the subprocess. On Windows, " "the Windows API function TerminateProcess() is called to stop the subprocess." msgstr "" #: library/asyncio-protocol.rst:424 msgid "See also :meth:`subprocess.Popen.terminate`." msgstr "" #: library/asyncio-protocol.rst:428 msgid "Kill the subprocess by calling the :meth:`kill` method." msgstr "" #: library/asyncio-protocol.rst:430 msgid "" "If the subprocess hasn't returned yet, and close transports of *stdin*, " "*stdout*, and *stderr* pipes." msgstr "" #: library/asyncio-protocol.rst:437 msgid "Protocols" msgstr "" #: library/asyncio-protocol.rst:439 msgid "**Source code:** :source:`Lib/asyncio/protocols.py`" msgstr "" #: library/asyncio-protocol.rst:443 msgid "" "asyncio provides a set of abstract base classes that should be used to " "implement network protocols. Those classes are meant to be used together " "with :ref:`transports `." msgstr "" #: library/asyncio-protocol.rst:447 msgid "" "Subclasses of abstract base protocol classes may implement some or all " "methods. All these methods are callbacks: they are called by transports on " "certain events, for example when some data is received. A base protocol " "method should be called by the corresponding transport." msgstr "" #: library/asyncio-protocol.rst:454 msgid "Base Protocols" msgstr "Protocoles de base" #: library/asyncio-protocol.rst:458 msgid "Base protocol with methods that all protocols share." msgstr "" #: library/asyncio-protocol.rst:462 msgid "" "The base class for implementing streaming protocols (TCP, Unix sockets, etc)." msgstr "" #: library/asyncio-protocol.rst:467 msgid "" "A base class for implementing streaming protocols with manual control of the " "receive buffer." msgstr "" #: library/asyncio-protocol.rst:472 msgid "The base class for implementing datagram (UDP) protocols." msgstr "" #: library/asyncio-protocol.rst:476 msgid "" "The base class for implementing protocols communicating with child processes " "(unidirectional pipes)." msgstr "" #: library/asyncio-protocol.rst:481 #, fuzzy msgid "Base Protocol" msgstr "Protocoles de base" #: library/asyncio-protocol.rst:483 msgid "All asyncio protocols can implement Base Protocol callbacks." msgstr "" #: library/asyncio-protocol.rst:486 msgid "Connection Callbacks" msgstr "" #: library/asyncio-protocol.rst:487 msgid "" "Connection callbacks are called on all protocols, exactly once per a " "successful connection. All other protocol callbacks can only be called " "between those two methods." msgstr "" #: library/asyncio-protocol.rst:493 msgid "Called when a connection is made." msgstr "Appelé lorsqu'une connexion est établie." #: library/asyncio-protocol.rst:495 msgid "" "The *transport* argument is the transport representing the connection. The " "protocol is responsible for storing the reference to its transport." msgstr "" #: library/asyncio-protocol.rst:501 msgid "Called when the connection is lost or closed." msgstr "Appelé lorsqu'une connexion est perdue ou fermée." #: library/asyncio-protocol.rst:503 msgid "" "The argument is either an exception object or :const:`None`. The latter " "means a regular EOF is received, or the connection was aborted or closed by " "this side of the connection." msgstr "" #: library/asyncio-protocol.rst:509 msgid "Flow Control Callbacks" msgstr "" #: library/asyncio-protocol.rst:510 msgid "" "Flow control callbacks can be called by transports to pause or resume " "writing performed by the protocol." msgstr "" #: library/asyncio-protocol.rst:513 msgid "" "See the documentation of the :meth:`~WriteTransport.set_write_buffer_limits` " "method for more details." msgstr "" #: library/asyncio-protocol.rst:518 msgid "Called when the transport's buffer goes over the high watermark." msgstr "" #: library/asyncio-protocol.rst:522 msgid "Called when the transport's buffer drains below the low watermark." msgstr "" #: library/asyncio-protocol.rst:524 msgid "" "If the buffer size equals the high watermark, :meth:`~BaseProtocol." "pause_writing` is not called: the buffer size must go strictly over." msgstr "" #: library/asyncio-protocol.rst:528 msgid "" "Conversely, :meth:`~BaseProtocol.resume_writing` is called when the buffer " "size is equal or lower than the low watermark. These end conditions are " "important to ensure that things go as expected when either mark is zero." msgstr "" #: library/asyncio-protocol.rst:535 msgid "Streaming Protocols" msgstr "Protocoles connectés" #: library/asyncio-protocol.rst:537 msgid "" "Event methods, such as :meth:`loop.create_server`, :meth:`loop." "create_unix_server`, :meth:`loop.create_connection`, :meth:`loop." "create_unix_connection`, :meth:`loop.connect_accepted_socket`, :meth:`loop." "connect_read_pipe`, and :meth:`loop.connect_write_pipe` accept factories " "that return streaming protocols." msgstr "" #: library/asyncio-protocol.rst:545 msgid "" "Called when some data is received. *data* is a non-empty bytes object " "containing the incoming data." msgstr "" #: library/asyncio-protocol.rst:548 msgid "" "Whether the data is buffered, chunked or reassembled depends on the " "transport. In general, you shouldn't rely on specific semantics and instead " "make your parsing generic and flexible. However, data is always received in " "the correct order." msgstr "" #: library/asyncio-protocol.rst:553 msgid "" "The method can be called an arbitrary number of times while a connection is " "open." msgstr "" #: library/asyncio-protocol.rst:556 msgid "" "However, :meth:`protocol.eof_received() ` is called " "at most once. Once ``eof_received()`` is called, ``data_received()`` is not " "called anymore." msgstr "" #: library/asyncio-protocol.rst:562 msgid "" "Called when the other end signals it won't send any more data (for example " "by calling :meth:`transport.write_eof() `, if the " "other end also uses asyncio)." msgstr "" #: library/asyncio-protocol.rst:567 msgid "" "This method may return a false value (including ``None``), in which case the " "transport will close itself. Conversely, if this method returns a true " "value, the protocol used determines whether to close the transport. Since " "the default implementation returns ``None``, it implicitly closes the " "connection." msgstr "" #: library/asyncio-protocol.rst:573 msgid "" "Some transports, including SSL, don't support half-closed connections, in " "which case returning true from this method will result in the connection " "being closed." msgstr "" #: library/asyncio-protocol.rst:578 library/asyncio-protocol.rst:636 msgid "State machine:" msgstr "Machine à états :" #: library/asyncio-protocol.rst:589 msgid "Buffered Streaming Protocols" msgstr "" #: library/asyncio-protocol.rst:593 msgid "" "Buffered Protocols can be used with any event loop method that supports " "`Streaming Protocols`_." msgstr "" #: library/asyncio-protocol.rst:596 msgid "" "``BufferedProtocol`` implementations allow explicit manual allocation and " "control of the receive buffer. Event loops can then use the buffer provided " "by the protocol to avoid unnecessary data copies. This can result in " "noticeable performance improvement for protocols that receive big amounts of " "data. Sophisticated protocol implementations can significantly reduce the " "number of buffer allocations." msgstr "" #: library/asyncio-protocol.rst:603 msgid "" "The following callbacks are called on :class:`BufferedProtocol` instances:" msgstr "" #: library/asyncio-protocol.rst:608 msgid "Called to allocate a new receive buffer." msgstr "" #: library/asyncio-protocol.rst:610 msgid "" "*sizehint* is the recommended minimum size for the returned buffer. It is " "acceptable to return smaller or larger buffers than what *sizehint* " "suggests. When set to -1, the buffer size can be arbitrary. It is an error " "to return a buffer with a zero size." msgstr "" #: library/asyncio-protocol.rst:615 msgid "" "``get_buffer()`` must return an object implementing the :ref:`buffer " "protocol `." msgstr "" #: library/asyncio-protocol.rst:620 msgid "Called when the buffer was updated with the received data." msgstr "" #: library/asyncio-protocol.rst:622 msgid "*nbytes* is the total number of bytes that were written to the buffer." msgstr "" #: library/asyncio-protocol.rst:626 msgid "" "See the documentation of the :meth:`protocol.eof_received() ` method." msgstr "" #: library/asyncio-protocol.rst:630 msgid "" ":meth:`~BufferedProtocol.get_buffer` can be called an arbitrary number of " "times during a connection. However, :meth:`protocol.eof_received() " "` is called at most once and, if called, :meth:" "`~BufferedProtocol.get_buffer` and :meth:`~BufferedProtocol.buffer_updated` " "won't be called after it." msgstr "" #: library/asyncio-protocol.rst:649 msgid "Datagram Protocols" msgstr "Protocoles non-connectés" #: library/asyncio-protocol.rst:651 msgid "" "Datagram Protocol instances should be constructed by protocol factories " "passed to the :meth:`loop.create_datagram_endpoint` method." msgstr "" #: library/asyncio-protocol.rst:656 msgid "" "Called when a datagram is received. *data* is a bytes object containing the " "incoming data. *addr* is the address of the peer sending the data; the " "exact format depends on the transport." msgstr "" #: library/asyncio-protocol.rst:662 msgid "" "Called when a previous send or receive operation raises an :class:" "`OSError`. *exc* is the :class:`OSError` instance." msgstr "" #: library/asyncio-protocol.rst:665 msgid "" "This method is called in rare conditions, when the transport (e.g. UDP) " "detects that a datagram could not be delivered to its recipient. In many " "conditions though, undeliverable datagrams will be silently dropped." msgstr "" #: library/asyncio-protocol.rst:672 msgid "" "On BSD systems (macOS, FreeBSD, etc.) flow control is not supported for " "datagram protocols, because there is no reliable way to detect send failures " "caused by writing too many packets." msgstr "" #: library/asyncio-protocol.rst:676 msgid "" "The socket always appears 'ready' and excess packets are dropped. An :class:" "`OSError` with ``errno`` set to :const:`errno.ENOBUFS` may or may not be " "raised; if it is raised, it will be reported to :meth:`DatagramProtocol." "error_received` but otherwise ignored." msgstr "" #: library/asyncio-protocol.rst:685 msgid "Subprocess Protocols" msgstr "Protocoles liés aux sous-processus" #: library/asyncio-protocol.rst:687 msgid "" "Subprocess Protocol instances should be constructed by protocol factories " "passed to the :meth:`loop.subprocess_exec` and :meth:`loop.subprocess_shell` " "methods." msgstr "" #: library/asyncio-protocol.rst:693 msgid "" "Called when the child process writes data into its stdout or stderr pipe." msgstr "" "Appelé lorsqu'un processus enfant écrit sur sa sortie d'erreur ou sa sortie " "standard." #: library/asyncio-protocol.rst:696 msgid "*fd* is the integer file descriptor of the pipe." msgstr "" #: library/asyncio-protocol.rst:698 msgid "*data* is a non-empty bytes object containing the received data." msgstr "" #: library/asyncio-protocol.rst:702 msgid "" "Called when one of the pipes communicating with the child process is closed." msgstr "" "Appelé lorsqu'une des *pipe*\\ s de communication avec un sous-processus est " "fermée." #: library/asyncio-protocol.rst:705 msgid "*fd* is the integer file descriptor that was closed." msgstr "" #: library/asyncio-protocol.rst:709 msgid "Called when the child process has exited." msgstr "Appelé lorsqu'un processus enfant se termine." #: library/asyncio-protocol.rst:713 msgid "Examples" msgstr "Exemples" #: library/asyncio-protocol.rst:718 msgid "TCP Echo Server" msgstr "Serveur de *ping* en TCP" #: library/asyncio-protocol.rst:720 msgid "" "Create a TCP echo server using the :meth:`loop.create_server` method, send " "back received data, and close the connection::" msgstr "" #: library/asyncio-protocol.rst:761 msgid "" "The :ref:`TCP echo server using streams ` " "example uses the high-level :func:`asyncio.start_server` function." msgstr "" #: library/asyncio-protocol.rst:767 msgid "TCP Echo Client" msgstr "Client de *ping* en TCP" #: library/asyncio-protocol.rst:769 msgid "" "A TCP echo client using the :meth:`loop.create_connection` method, sends " "data, and waits until the connection is closed::" msgstr "" #: library/asyncio-protocol.rst:817 msgid "" "The :ref:`TCP echo client using streams ` " "example uses the high-level :func:`asyncio.open_connection` function." msgstr "" #: library/asyncio-protocol.rst:824 msgid "UDP Echo Server" msgstr "Serveur de *ping* en UDP" #: library/asyncio-protocol.rst:826 msgid "" "A UDP echo server, using the :meth:`loop.create_datagram_endpoint` method, " "sends back received data::" msgstr "" #: library/asyncio-protocol.rst:868 msgid "UDP Echo Client" msgstr "Client de *ping* en UDP" #: library/asyncio-protocol.rst:870 msgid "" "A UDP echo client, using the :meth:`loop.create_datagram_endpoint` method, " "sends data and closes the transport when it receives the answer::" msgstr "" #: library/asyncio-protocol.rst:925 msgid "Connecting Existing Sockets" msgstr "" #: library/asyncio-protocol.rst:927 msgid "" "Wait until a socket receives data using the :meth:`loop.create_connection` " "method with a protocol::" msgstr "" #: library/asyncio-protocol.rst:981 msgid "" "The :ref:`watch a file descriptor for read events " "` example uses the low-level :meth:`loop." "add_reader` method to register an FD." msgstr "" #: library/asyncio-protocol.rst:985 msgid "" "The :ref:`register an open socket to wait for data using streams " "` example uses high-level streams " "created by the :func:`open_connection` function in a coroutine." msgstr "" #: library/asyncio-protocol.rst:992 msgid "loop.subprocess_exec() and SubprocessProtocol" msgstr "" #: library/asyncio-protocol.rst:994 msgid "" "An example of a subprocess protocol used to get the output of a subprocess " "and to wait for the subprocess exit." msgstr "" #: library/asyncio-protocol.rst:997 msgid "The subprocess is created by the :meth:`loop.subprocess_exec` method::" msgstr "" #: library/asyncio-protocol.rst:1043 msgid "" "See also the :ref:`same example ` " "written using high-level APIs." msgstr ""