def connect(self):
        if self.connected:
            self.throw_exception(message='connection already established')

        current_time = time.time()
        if current_time < self.allowed_connect_time:
            self.throw_exception(message='attempted to connect before required cooldown')

        self.allowed_connect_time = current_time + self.connect_cooldown_seconds

        self._reset_connection()

        self._create_client_socket()

        self.connected = True
        self._is_client_side = True
        self._is_server_side = False
Implements :func:`autobahn.wamp.interfaces.IObjectSerializer.serialize`
dataset/ETHPy150Open YelpArchive/python-gearman/gearman/connection.py/GearmanConnection.connect--crossover with--dataset/ETHPy150Open crossbario/autobahn-python/autobahn/wamp/serializer.py/MsgPackObjectSerializer.serialize