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
715b861d
Kaydet (Commit)
715b861d
authored
Haz 07, 2002
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Clarify the interaction between timeout/non-blocking mode, makefile
and fromfd.
üst
62a7f63a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
libsocket.tex
Doc/lib/libsocket.tex
+10
-1
No files found.
Doc/lib/libsocket.tex
Dosyayı görüntüle @
715b861d
...
...
@@ -284,7 +284,7 @@ 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
created
in blocking mode without
daemon). The socket is assumed to be in blocking mode without
a timeout.
Availability:
\UNIX
.
\end{funcdesc}
...
...
@@ -455,6 +455,7 @@ are described in \ref{bltin-file-objects}, ``File Objects.'')
The file object references a
\cfunction
{
dup()
}
ped version of the
socket file descriptor, so the file object and socket object may be
closed or garbage-collected independently.
The socket should be in blocking mode.
\index
{
I/O control!buffering
}
The optional
\var
{
mode
}
and
\var
{
bufsize
}
arguments are interpreted the same way as by the
built-in
\function
{
file()
}
function; see ``Built-in Functions''
...
...
@@ -546,6 +547,14 @@ previously set timeout. Setting the timeout to zero acts similarly
but is implemented different than setting the socket in non-blocking
mode (this could be considered a bug and may even be fixed).
Timeout mode internally sets the socket in non-blocking mode. The
blocking and timeout modes are shared between file descriptors and
socket objects that refer to the same network endpoint. A consequence
of this is that file objects returned by the
\method
{
makefile()
}
method should only be used when the socket is in blocking mode; in
timeout or non-blocking mode file operations that cannot be completed
immediately will fail.
\begin{methoddesc}
[socket]
{
setsockopt
}{
level, optname, value
}
Set the value of the given socket option (see the
\UNIX
{}
manual page
\manpage
{
setsockopt
}{
2
}
). The needed symbolic constants are defined in
...
...
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