Ulli Horlacher <frams...@rus.uni-stuttgart.de> wrote:

> Ok, so funktionierts nun:
> 
>   sock = socket.create_connection((server,port))
>   (...)
>   if port == 443:
>     sslctx = ssl.create_default_context()
>     sock = sslctx.wrap_socket(sock,server_hostname=server)
> 
> Jetzt kann ich sock zur Kommunikation verwenden, egal ob HTTP oder HTTPS.

Und Beispiellauf:

framstag@moep:~/python: ./fexit.py -T 10000
fexit: upload to fex.belwue.de:443
nettest: 10000 MB in 23 s = 430919 kB/s
fexit: download from fex.belwue.de:443
nettest: 10000 MB in 36 s = 283999 kB/s

Tut also. Prima.

-- 
Ullrich Horlacher              Server und Virtualisierung
Rechenzentrum TIK
Universitaet Stuttgart         E-Mail: horlac...@tik.uni-stuttgart.de
Allmandring 30a                Tel:    ++49-711-68565868
70569 Stuttgart (Germany)      WWW:    https://www.tik.uni-stuttgart.de/
_______________________________________________
python-de Mailingliste -- python-de@python.org
Zur Abmeldung von dieser Mailingliste senden Sie eine Nachricht an 
python-de-le...@python.org
https://mail.python.org/mailman3/lists/python-de.python.org/
Mitgliedsadresse: arch...@mail-archive.com

Reply via email to