SSL.Connection and select
Andre Reitz <[email protected]>
| Newsgroups | gmane.comp.python.cryptography |
|---|---|
| Message-ID | <[email protected]> |
Hi,
I just read an old discussion about SSL-Sockets and select.
Therefore a question:
Does the standard select function work on SSL-Sockets or not?
I need a blocking SSL Connection.
Because my application is a multithreaded server, I
use:
self._connection=SSL.Connection(...)
self._connection.setblocking(0)
...
and then:
def _read(self,count):
assert count>0
try:
while 1:
s=self._connection.read(count)
if s==None:
time.sleep(0.001)
else:
assert s #s must not be ""!
return s #less than count bytes is ok
except SSL.SSLError,err:
if err.args[0]=="unexpected eof": return "" #EOF
else : raise
Now I want to get rid of the time.sleep(0.001).
My Idea is to use select, but I am confused if it is
a correct way to use select on a SSL-Socket.
Thank you very much in advance,
Greetings, Andre'
--
__________________________________________________________________________
Als Technologieunternehmen konzipieren und entwickeln wir maßgeschneiderte Feedback- und
Monitoring-Systeme - wie beispielsweise Lösungen für Beschwerde- und Ideenmanagement.
Mit dem Inquery® Survey Server bieten wir eine der leistungsfähigsten Standardlösungen für
Online-Umfragen mit dem Schwerpunkt auf der Messung von Kundenzufriedenheit an.
__________________________________________________________________________
Inworks GmbH
Andre Reitz, Leiter Entwicklung
Hörvelsinger Weg 39, 89081 Ulm, Germany
Tel +49 (0) 731 / 93807-21
Fax +49(0)731/93807-18
Internet: http://www.inworks.de