OLD | NEW |
1 """Class for caching TLS sessions.""" | 1 """Class for caching TLS sessions.""" |
2 | 2 |
3 import thread | 3 import thread |
4 import time | 4 import time |
5 | 5 |
6 class SessionCache: | 6 class SessionCache: |
7 """This class is used by the server to cache TLS sessions. | 7 """This class is used by the server to cache TLS sessions. |
8 | 8 |
9 Caching sessions allows the client to use TLS session resumption | 9 Caching sessions allows the client to use TLS session resumption |
10 and avoid the expense of a full handshake. To use this class, | 10 and avoid the expense of a full handshake. To use this class, |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 else: | 94 else: |
95 break | 95 break |
96 self.firstIndex = index | 96 self.firstIndex = index |
97 | 97 |
98 def _test(): | 98 def _test(): |
99 import doctest, SessionCache | 99 import doctest, SessionCache |
100 return doctest.testmod(SessionCache) | 100 return doctest.testmod(SessionCache) |
101 | 101 |
102 if __name__ == "__main__": | 102 if __name__ == "__main__": |
103 _test() | 103 _test() |
OLD | NEW |