Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
81d167a4
Kaydet (Commit)
81d167a4
authored
Haz 08, 2016
tarafından
Yury Selivanov
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Merge 3.5 (asyncio, issue #27136)
üst
552bf946
55c50842
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
23 deletions
+24
-23
asyncio-eventloop.rst
Doc/library/asyncio-eventloop.rst
+24
-23
No files found.
Doc/library/asyncio-eventloop.rst
Dosyayı görüntüle @
81d167a4
...
@@ -492,7 +492,10 @@ Low-level socket operations
...
@@ -492,7 +492,10 @@ Low-level socket operations
.. coroutinemethod:: BaseEventLoop.sock_recv(sock, nbytes)
.. coroutinemethod:: BaseEventLoop.sock_recv(sock, nbytes)
Receive data from the socket. The return value is a bytes object
Receive data from the socket. Modeled after blocking
:meth:`socket.socket.recv` method.
The return value is a bytes object
representing the data received. The maximum amount of data to be received
representing the data received. The maximum amount of data to be received
at once is specified by *nbytes*.
at once is specified by *nbytes*.
...
@@ -501,13 +504,12 @@ Low-level socket operations
...
@@ -501,13 +504,12 @@ Low-level socket operations
This method is a :ref:`coroutine <coroutine>`.
This method is a :ref:`coroutine <coroutine>`.
.. seealso::
The :meth:`socket.socket.recv` method.
.. coroutinemethod:: BaseEventLoop.sock_sendall(sock, data)
.. coroutinemethod:: BaseEventLoop.sock_sendall(sock, data)
Send data to the socket. The socket must be connected to a remote socket.
Send data to the socket. Modeled after blocking
:meth:`socket.socket.sendall` method.
The socket must be connected to a remote socket.
This method continues to send data from *data* until either all data has
This method continues to send data from *data* until either all data has
been sent or an error occurs. ``None`` is returned on success. On error,
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
an exception is raised, and there is no way to determine how much data, if
...
@@ -518,35 +520,35 @@ Low-level socket operations
...
@@ -518,35 +520,35 @@ Low-level socket operations
This method is a :ref:`coroutine <coroutine>`.
This method is a :ref:`coroutine <coroutine>`.
.. seealso::
The :meth:`socket.socket.sendall` method.
.. coroutinemethod:: BaseEventLoop.sock_connect(sock, address)
.. coroutinemethod:: BaseEventLoop.sock_connect(sock, address)
Connect to a remote socket at *address*.
Connect to a remote socket at *address*. Modeled after
blocking :meth:`socket.socket.connect` method.
The *address* must be already resolved to avoid the trap of hanging the
entire event loop when the address requires doing a DNS lookup. For
example, it must be an IP address, not a hostname, for
:py:data:`~socket.AF_INET` and :py:data:`~socket.AF_INET6` address families.
Use :meth:`getaddrinfo` to resolve the hostname asynchronously.
With :class:`SelectorEventLoop` event loop, the socket *sock* must be
With :class:`SelectorEventLoop` event loop, the socket *sock* must be
non-blocking.
non-blocking.
This method is a :ref:`coroutine <coroutine>`.
This method is a :ref:`coroutine <coroutine>`.
.. versionchanged:: 3.5.2
``address`` no longer needs to be resolved. ``sock_connect``
will try to check if the *address* is already resolved by calling
:func:`socket.inet_pton`. If not,
:meth:`BaseEventLoop.getaddrinfo` will be used to resolve the
*address*.
.. seealso::
.. seealso::
The :meth:`BaseEventLoop.create_connection` method, the
:meth:`BaseEventLoop.create_connection`
:func:`open_connection` function and the :meth:`socket.socket.connect`
and :func:`asyncio.open_connection() <open_connection>`.
method.
.. coroutinemethod:: BaseEventLoop.sock_accept(sock)
.. coroutinemethod:: BaseEventLoop.sock_accept(sock)
Accept a connection. The socket must be bound to an address and listening
Accept a connection. Modeled after blocking
:meth:`socket.socket.accept`.
The socket must be bound to an address and listening
for connections. The return value is a pair ``(conn, address)`` where *conn*
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,
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
and *address* is the address bound to the socket on the other end of the
...
@@ -558,8 +560,7 @@ Low-level socket operations
...
@@ -558,8 +560,7 @@ Low-level socket operations
.. seealso::
.. seealso::
The :meth:`BaseEventLoop.create_server` method, the :func:`start_server`
:meth:`BaseEventLoop.create_server` and :func:`start_server`.
function and the :meth:`socket.socket.accept` method.
Resolve host name
Resolve host name
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment