Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > de.comp.lang.python > #5517
| From | Ulli Horlacher <framstag@rus.uni-stuttgart.de> |
|---|---|
| Newsgroups | de.comp.lang.python |
| Subject | Re: [Python-de] socket.create_connection() ipv4 oder ipv6? |
| Date | 2019-06-25 15:46 +0000 |
| Organization | University of Stuttgart, FRG |
| Message-ID | <qetfk8$2ev$1@news2.informatik.uni-stuttgart.de> (permalink) |
| References | <qess02$t26$1@news2.informatik.uni-stuttgart.de> <gnebcoFcaktU1@mid.individual.net> <qet6ra$vtp$1@news2.informatik.uni-stuttgart.de> <f6e249a1-8afd-335f-53b9-bd4b63a7fe04@gethmann.org> <mailman.21.1561470135.29664.python-de@python.org> |
Julian Gethmann <mail.python.org@gethmann.org> wrote:
> >>> sock.family
>
>
> <AddressFamily.AF_INET6: 10>
>
> zurück. Ein Blick in die Python-Quellen zeigt, dass getaddrinfo benutzt
> wird, welches auch sowohl v6, als auch v4 zurück liefert.
> Ich denke, dass die Betriebssystem-Funktionen genutzt werden, sprich auf
> aktuellen Linux, Mac und Windows v6 priorisiert wird (afaik).
Das hier kommt bei Windows 7, 64bit:
Z:\python>python
Python 3.6.7 (v3.6.7:6ec5cf24b7, Oct 20 2018, 13:35:33) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import socket
>>> sock = socket.create_connection(('flupp.belwue.de',591))
>>> sock.family
<AddressFamily.AF_INET: 2>
> Hoffentlich hilft das schon mal ein bisschen weiter.
Ja, prima, das ist genau das, was ich erhofft hatte!
Ich will naemlich die Standard Internetverbindung testen. Also das, was
das OS im Normalfall nimmt, ohne dass man explizit setzt.
--
Ullrich Horlacher Server und Virtualisierung
Rechenzentrum TIK
Universitaet Stuttgart E-Mail: horlacher@tik.uni-stuttgart.de
Allmandring 30a Tel: ++49-711-68565868
70569 Stuttgart (Germany) WWW: http://www.tik.uni-stuttgart.de/
Back to de.comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar
socket.create_connection() ipv4 oder ipv6? Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2019-06-25 10:11 +0000
Re: socket.create_connection() ipv4 oder ipv6? "Peter Heitzer" <peter.heitzer@rz.uni-regensburg.de> - 2019-06-25 10:29 +0000
Re: socket.create_connection() ipv4 oder ipv6? Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2019-06-25 13:16 +0000
Re: [Python-de] socket.create_connection() ipv4 oder ipv6? Julian Gethmann <mail.python.org@gethmann.org> - 2019-06-25 15:42 +0200
Re: [Python-de] socket.create_connection() ipv4 oder ipv6? Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2019-06-25 15:46 +0000
Re: socket.create_connection() ipv4 oder ipv6? Florian Weimer <fw@deneb.enyo.de> - 2019-06-29 21:02 +0200
Re: socket.create_connection() ipv4 oder ipv6? Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2019-06-29 20:21 +0000
csiph-web