Just some debug messages showing which protocol has been selected.
void ClientAuthHandler::setPeer(RemotePeer *peer)
{
+ qDebug().nospace() << "Using " << qPrintable(peer->protocolName()) << "...";
+
_peer = peer;
connect(_peer, SIGNAL(transferProgress(int,int)), SIGNAL(transferProgress(int,int)));
DataStreamPeer(AuthHandler *authHandler, QTcpSocket *socket, quint16 features, QObject *parent = 0);
Protocol::Type protocol() const { return Protocol::DataStreamProtocol; }
+ QString protocolName() const { return "the DataStream protocol"; }
static quint16 supportedFeatures();
static bool acceptsFeatures(quint16 peerFeatures);
LegacyPeer(AuthHandler *authHandler, QTcpSocket *socket, QObject *parent = 0);
Protocol::Type protocol() const { return Protocol::LegacyProtocol; }
+ QString protocolName() const { return "the legacy protocol"; }
void setSignalProxy(SignalProxy *proxy);
void setSignalProxy(SignalProxy *proxy);
virtual Protocol::Type protocol() const = 0;
+ virtual QString protocolName() const = 0;
virtual QString description() const;
virtual quint16 enabledFeatures() const { return 0; }
void CoreAuthHandler::setPeer(RemotePeer *peer)
{
+ qDebug().nospace() << "Using " << qPrintable(peer->protocolName()) << "...";
+
_peer = peer;
disconnect(socket(), SIGNAL(readyRead()), this, SLOT(onReadyRead()));
}