def __init__(self, address, port, timeout=<NUM_LIT:10>, session=None):
self._done_handshake = False<EOL>self._server_hello = b'<STR_LIT>'<EOL>self._client_hello = b'<STR_LIT>'<EOL>self._decrypted_bytes = b'<STR_LIT>'<EOL>if address is None and port is None:<EOL><INDENT>self._socket = None<EOL><DEDENT>else:<EOL><INDENT>if not isinstance(address, str_cls):<EOL><INDENT>raise TypeError(pretty_message(<EOL>'''<STR_LIT>''',<EOL>type_name(address)<EOL>))<EOL><DEDENT>if not isinstance(port, int_types):<EOL><INDENT>raise TypeError(pretty_message(<EOL>'''<STR_LIT>''',<EOL>type_name(port)<EOL>))<EOL><DEDENT>if timeout is not None and not isinstance(timeout, numbers.Number):<EOL><INDENT>raise TypeError(pretty_message(<EOL>'''<STR_LIT>''',<EOL>type_name(timeout)<EOL>))<EOL><DEDENT>self._socket = socket_.create_connection((address, port), timeout)<EOL>self._socket.settimeout(timeout)<EOL><DEDENT>if session is None:<EOL><INDENT>session = TLSSession()<EOL><DEDENT>elif not isinstance(session, TLSSession):<EOL><INDENT>raise TypeError(pretty_message(<EOL>'''<STR_LIT>''',<EOL>type_name(session)<EOL>))<EOL><DEDENT>self._session = session<EOL>if self._socket:<EOL><INDENT>self._hostname = address<EOL>self._handshake()<EOL><DEDENT>
:param address:
    A unicode string of the domain name or IP address to conenct to

:param port:
    An integer of the port number to connect to

:param timeout:
    An integer timeout to use for the socket

:param session:
    An oscrypto.tls.TLSSession object to allow for session reuse and
    controlling the protocols and validation performed