aboutsummaryrefslogtreecommitdiffstats
path: root/netlib/tcp.py
diff options
context:
space:
mode:
Diffstat (limited to 'netlib/tcp.py')
-rw-r--r--netlib/tcp.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/netlib/tcp.py b/netlib/tcp.py
index 007cf3a5..25e83e07 100644
--- a/netlib/tcp.py
+++ b/netlib/tcp.py
@@ -48,11 +48,10 @@ class FileLike:
class TCPClient:
- def __init__(self, ssl, host, port, clientcert, sni):
- self.ssl, self.host, self.port, self.clientcert, self.sni = ssl, host, port, clientcert, sni
+ def __init__(self, ssl, host, port, clientcert):
+ self.ssl, self.host, self.port, self.clientcert = ssl, host, port, clientcert
self.connection, self.rfile, self.wfile = None, None, None
self.cert = None
- self.connect()
def connect(self):
try:
@@ -75,6 +74,9 @@ class TCPClient:
class BaseHandler:
+ """
+ The instantiator is expected to call the handle() and finish() methods.
+ """
rbufsize = -1
wbufsize = 0
def __init__(self, connection, client_address, server):
@@ -84,8 +86,6 @@ class BaseHandler:
self.client_address = client_address
self.server = server
- self.handle()
- self.finish()
def convert_to_ssl(self, cert, key):
ctx = SSL.Context(SSL.SSLv23_METHOD)