CoreAuthHandler::CoreAuthHandler(QTcpSocket *socket, QObject *parent)
    : AuthHandler(parent),
    _peer(0),
    _magicReceived(false),
    _legacy(false),
    _clientRegistered(false),
    _connectionFeatures(0)
{
    setSocket(socket);
    connect(socket, SIGNAL(readyRead()), SLOT(onReadyRead()));

    // TODO: Timeout for the handshake phase

}
CoreAuthHandler::CoreAuthHandler(QTcpSocket *socket, QObject *parent)
    : AuthHandler(parent),
    _peer(0),
    _magicReceived(false),
    _legacy(false),
    _clientRegistered(false),
    _connectionFeatures(0)
{
    setSocket(socket);
    connect(socket, SIGNAL(readyRead()), SLOT(onReadyRead()));

     

}