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
9081bb1d
Kaydet (Commit)
9081bb1d
authored
Eyl 25, 2001
tarafından
Fred Drake
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Added documentation for the SSL interface, contributed by Gerhard Häring.
This closes SF patch #461337.
üst
74f1a563
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
libsocket.tex
Doc/lib/libsocket.tex
+23
-0
No files found.
Doc/lib/libsocket.tex
Dosyayı görüntüle @
9081bb1d
...
@@ -265,6 +265,15 @@ protocol number. The address family should be \constant{AF_INET}, \constant{AF_
...
@@ -265,6 +265,15 @@ protocol number. The address family should be \constant{AF_INET}, \constant{AF_
The protocol number is usually zero and may be omitted in that case.
The protocol number is usually zero and may be omitted in that case.
\end{funcdesc}
\end{funcdesc}
\begin{funcdesc}
{
ssl
}{
sock, keyfile, certfile
}
Initiate a SSL connection over the socket
\var
{
sock
}
.
\var
{
keyfile
}
is
the name of a PEM formatted file that contains your private
key.
\var
{
certfile
}
is a PEM formatted certificate chain file. On
success, a new
\class
{
SSLObject
}
is returned.
\strong
{
Warning:
}
This does not do any certificate verification!
\end{funcdesc}
\begin{funcdesc}
{
fromfd
}{
fd, family, type
\optional
{
, proto
}}
\begin{funcdesc}
{
fromfd
}{
fd, family, type
\optional
{
, proto
}}
Build a socket object from an existing file descriptor (an integer as
Build a socket object from an existing file descriptor (an integer as
returned by a file object's
\method
{
fileno()
}
method). Address family,
returned by a file object's
\method
{
fileno()
}
method). Address family,
...
@@ -510,6 +519,20 @@ use \method{recv()} and \method{send()} without \var{flags} argument
...
@@ -510,6 +519,20 @@ use \method{recv()} and \method{send()} without \var{flags} argument
instead.
instead.
\subsection
{
SSL Objects
\label
{
ssl-objects
}}
SSL objects have the following methods.
\begin{methoddesc}
{
write
}{
s
}
Writes the string
\var
{
s
}
to the on the object's SSL connection.
The return value is the number of bytes written.
\end{methoddesc}
\begin{methoddesc}
{
read
}{
\optional
{
n
}}
If
\var
{
n
}
is provided, read
\var
{
n
}
bytes from the SSL connection, otherwise
read until EOF. The return value is a string of the bytes read.
\end{methoddesc}
\subsection
{
Example
\label
{
socket-example
}}
\subsection
{
Example
\label
{
socket-example
}}
Here are four minimal example programs using the TCP/IP protocol:
\
a
Here are four minimal example programs using the TCP/IP protocol:
\
a
...
...
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