Added ssl wrapper to self.socket with parameters dependant on if the Socket class is waiting for connections in connect_client or if it connects as a client in connect_server.