Ulli Horlacher <[email protected]> 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: [email protected] Allmandring 30a Tel: ++49-711-68565868 70569 Stuttgart (Germany) WWW: https://www.tik.uni-stuttgart.de/ _______________________________________________ python-de Mailingliste -- [email protected] Zur Abmeldung von dieser Mailingliste senden Sie eine Nachricht an [email protected] https://mail.python.org/mailman3/lists/python-de.python.org/ Mitgliedsadresse: [email protected]
