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
f03facfe
Kaydet (Commit)
f03facfe
authored
Mar 26, 2007
tarafından
Georg Brandl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Some nits.
üst
51b7abc5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
10 deletions
+10
-10
libhttplib.tex
Doc/lib/libhttplib.tex
+2
-3
libsocket.tex
Doc/lib/libsocket.tex
+6
-6
httplib.py
Lib/httplib.py
+2
-1
No files found.
Doc/lib/libhttplib.tex
Dosyayı görüntüle @
f03facfe
...
...
@@ -32,12 +32,11 @@ An \class{HTTPConnection} instance represents one transaction with an HTTP
server. It should be instantiated passing it a host and optional port number.
If no port number is passed, the port is extracted from the host string if it
has the form
\code
{
\var
{
host
}
:
\var
{
port
}}
, else the default HTTP port (80) is
used.
When True the optional parameter
\var
{
strict
}
used. When True, the optional parameter
\var
{
strict
}
causes
\code
{
BadStatusLine
}
to be raised if the status line can't be parsed
as a valid HTTP/1.0 or 1.1 status line. If the optional
\var
{
timeout
}
parameter is given, connection attempts will timeout after that many
seconds (if
no timeout is passed, or is passed as None
, the global default
seconds (if
it is not given or
\code
{
None
}
, the global default
timeout setting is used).
For example, the following calls all create instances that connect to
...
...
Doc/lib/libsocket.tex
Dosyayı görüntüle @
f03facfe
...
...
@@ -171,12 +171,12 @@ supported on this platform.
\end{datadesc}
\begin{funcdesc}
{
create
_
connection
}{
address
\optional
{
, timeout
}}
Connects to the
\var
{
address
}
received (as usual, a
pair host/port), with
an optional timeout for the connection. Specially useful for higher-level
protocols, it is not normally used directly from application-level code.
Passing the optional
\var
{
timeout
}
parameter will set the timeout on the
socket instance (if not present, or passed as None, the global default
timeout setting is used).
Connects to the
\var
{
address
}
received (as usual, a
\code
{
(host, port)
}
pair), with an optional timeout for the connection. Specially useful for
higher-level protocols, it is not normally used directly from
application-level code. Passing the optional
\var
{
timeout
}
parameter
will set the timeout on the socket instance (if it is not given or
\code
{
None
}
, the global default
timeout setting is used).
\end{funcdesc}
\begin{funcdesc}
{
getaddrinfo
}{
host, port
\optional
{
, family
\optional
{
,
...
...
Lib/httplib.py
Dosyayı görüntüle @
f03facfe
...
...
@@ -659,7 +659,8 @@ class HTTPConnection:
def
connect
(
self
):
"""Connect to the host and port specified in __init__."""
self
.
sock
=
socket
.
create_connection
((
self
.
host
,
self
.
port
),
self
.
timeout
)
self
.
sock
=
socket
.
create_connection
((
self
.
host
,
self
.
port
),
self
.
timeout
)
def
close
(
self
):
"""Close the connection to the HTTP server."""
...
...
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