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
fe27a508
Kaydet (Commit)
fe27a508
authored
Ock 11, 1997
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Added warning that gethostname() doesn't always return fqdn, and show
how to find it using gethostbyaddr().
üst
5709dcfa
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
libsocket.tex
Doc/lib/libsocket.tex
+5
-0
libsocket.tex
Doc/libsocket.tex
+5
-0
No files found.
Doc/lib/libsocket.tex
Dosyayı görüntüle @
fe27a508
...
...
@@ -96,6 +96,9 @@ Return a string containing the hostname of the machine where
the Python interpreter is currently executing. If you want to know the
current machine's IP address, use
\code
{
socket.gethostbyname(socket.gethostname())
}
.
Note:
\code
{
gethostname()
}
doesn't always return the fully qualified
domain name; use
\code
{
socket.gethostbyaddr(socket.gethostname())
}
(see below).
\end{funcdesc}
\begin{funcdesc}
{
gethostbyaddr
}{
ip
_
address
}
...
...
@@ -105,6 +108,8 @@ Return a triple \code{(hostname, aliaslist, ipaddrlist)} where
alternative host names for the same address, and
\code
{
ipaddrlist
}
is
a list of IP addresses for the same interface on the same
host (most likely containing only a single address).
To find the fully qualified domain name, check
\var
{
hostname
}
and the
items of
\var
{
aliaslist
}
for an entry containing at least one period.
\end{funcdesc}
\begin{funcdesc}
{
getprotobyname
}{
protocolname
}
...
...
Doc/libsocket.tex
Dosyayı görüntüle @
fe27a508
...
...
@@ -96,6 +96,9 @@ Return a string containing the hostname of the machine where
the Python interpreter is currently executing. If you want to know the
current machine's IP address, use
\code
{
socket.gethostbyname(socket.gethostname())
}
.
Note:
\code
{
gethostname()
}
doesn't always return the fully qualified
domain name; use
\code
{
socket.gethostbyaddr(socket.gethostname())
}
(see below).
\end{funcdesc}
\begin{funcdesc}
{
gethostbyaddr
}{
ip
_
address
}
...
...
@@ -105,6 +108,8 @@ Return a triple \code{(hostname, aliaslist, ipaddrlist)} where
alternative host names for the same address, and
\code
{
ipaddrlist
}
is
a list of IP addresses for the same interface on the same
host (most likely containing only a single address).
To find the fully qualified domain name, check
\var
{
hostname
}
and the
items of
\var
{
aliaslist
}
for an entry containing at least one period.
\end{funcdesc}
\begin{funcdesc}
{
getprotobyname
}{
protocolname
}
...
...
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