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
c77f6c6e
Kaydet (Commit)
c77f6c6e
authored
Mar 18, 2007
tarafından
Georg Brandl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Backport docs for recv_into and recvfrom_into.
üst
8e92dd0c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
2 deletions
+24
-2
libsocket.tex
Doc/lib/libsocket.tex
+22
-0
whatsnew25.tex
Doc/whatsnew/whatsnew25.tex
+2
-2
No files found.
Doc/lib/libsocket.tex
Dosyayı görüntüle @
c77f6c6e
...
...
@@ -574,6 +574,28 @@ same meaning as for \method{recv()} above.
(The format of
\var
{
address
}
depends on the address family --- see above.)
\end{methoddesc}
\begin{methoddesc}
[socket]
{
recvfrom
_
into
}{
buffer
\optional
{
, nbytes
\optional
{
, flags
}}}
Receive data from the socket, writing it into
\var
{
buffer
}
instead of
creating a new string. The return value is a pair
\code
{
(
\var
{
nbytes
}
,
\var
{
address
}
)
}
where
\var
{
nbytes
}
is the number
of bytes received and
\var
{
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
\var
{
flags
}
; it defaults to zero. (The format of
\var
{
address
}
depends on the address family --- see above.)
\versionadded
{
2.5
}
\end{methoddesc}
\begin{methoddesc}
[socket]
{
recv
_
into
}{
buffer
\optional
{
, nbytes
\optional
{
, flags
}}}
Receive up to
\var
{
nbytes
}
bytes from the socket,
storing the data into a buffer rather than creating a new string.
If
\var
{
nbytes
}
is not specified (or 0),
receive up to the size available in the given buffer.
See the
\UNIX
{}
manual page
\manpage
{
recv
}{
2
}
for the meaning of the
optional argument
\var
{
flags
}
; it defaults to zero.
\versionadded
{
2.5
}
\end{methoddesc}
\begin{methoddesc}
[socket]
{
send
}{
string
\optional
{
, flags
}}
Send data to the socket. The socket must be connected to a remote
socket. The optional
\var
{
flags
}
argument has the same meaning as for
...
...
Doc/whatsnew/whatsnew25.tex
Dosyayı görüntüle @
c77f6c6e
...
...
@@ -1704,8 +1704,8 @@ article about them is at \url{http://www.linuxjournal.com/article/7356}.
In Python code, netlink addresses are represented as a tuple of 2 integers,
\code
{
(
\var
{
pid
}
,
\var
{
group
_
mask
}
)
}
.
Two new methods on socket objects,
\method
{
recv
_
buf
(
\var
{
buffer
}
)
}
and
\method
{
recvfrom
_
buf
(
\var
{
buffer
}
)
}
, store the received data in an object
Two new methods on socket objects,
\method
{
recv
_
into
(
\var
{
buffer
}
)
}
and
\method
{
recvfrom
_
into
(
\var
{
buffer
}
)
}
, store the received data in an object
that supports the buffer protocol instead of returning the data as a
string. This means you can put the data directly into an array or a
memory-mapped file.
...
...
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