Esempio n. 1
0
void DomainHandler::clearConnectionInfo() {
    _uuid = QUuid();

    _icePeer = NetworkPeer();

    if (requiresICE()) {
        // if we connected to this domain with ICE, re-set the socket so we reconnect through the ice-server
        _sockAddr.clear();
    }

    setIsConnected(false);
}
Esempio n. 2
0
void DomainHandler::disconnect() {
    // if we're currently connected to a domain, send a disconnect packet on our way out
    if (_isConnected) {
        sendDisconnectPacket();
    }
    
    // clear member variables that hold the connection state to a domain
    _uuid = QUuid();
    _connectionToken = QUuid();
    
    _icePeer.reset();

    if (requiresICE()) {
        // if we connected to this domain with ICE, re-set the socket so we reconnect through the ice-server
        _sockAddr.clear();
    }

    setIsConnected(false);
}