void ItalcVncConnection::handleSecTypeItalc( rfbClient *client ) { SocketDevice socketDev( libvncClientDispatcher, client ); // read list of supported authentication types QMap<QString, QVariant> supportedAuthTypes = socketDev.read().toMap(); int chosenAuthType = ItalcAuthCommonSecret; if( !supportedAuthTypes.isEmpty() ) { chosenAuthType = supportedAuthTypes.values().first().toInt(); // look whether the ItalcVncConnection recommends a specific // authentication type (e.g. ItalcAuthHostBased when running as // demo client) ItalcVncConnection *t = (ItalcVncConnection *) rfbClientGetClientData( client, 0 ); if( t != NULL ) { foreach( const QVariant &v, supportedAuthTypes ) { if( t->italcAuthType() == v.toInt() ) { chosenAuthType = v.toInt(); } } }
bool VeyonCoreConnection::handleServerMessage( rfbClient *client, uint8_t msg ) { if( msg == rfbVeyonFeatureMessage ) { SocketDevice socketDev( VeyonVncConnection::libvncClientDispatcher, client ); FeatureMessage featureMessage( &socketDev ); if( featureMessage.receive() == false ) { qDebug( "VeyonCoreConnection: could not receive feature message" ); return false; } qDebug() << "VeyonCoreConnection: received feature message" << featureMessage.command() << "with arguments" << featureMessage.arguments(); emit featureMessageReceived( featureMessage ); return true; } else { qCritical( "VeyonCoreConnection::handleServerMessage(): " "unknown message type %d from server. Closing " "connection. Will re-open it later.", (int) msg ); return false; } return true; }