hi,
can someone help me coz my conversion from socket stream doesnt work (or maybe i'm just blind).. thanks in advance
qDebug() << "server sending auth question!!!";
qDebug() << sockdata.toHex();
qDebug() << sockdata.mid(2, 1).toHex() << ":" << sockdata.mid(3, 1).toHex() << ":" << sockdata.mid(4.1).toHex();
bool ok;
quint8 res;
int num1=sockdata.mid(2, 1).toInt(&ok, 10);
int num2=sockdata.mid(3, 1).toInt(&ok, 10);
int oper=sockdata.mid(4, 1).toInt(&ok, 10);
qDebug() << "num1 " << num1 << " num2 " << num2 << " op " << oper;
qDebug() << "server sending auth question!!!";
qDebug() << sockdata.toHex();
qDebug() << sockdata.mid(2, 1).toHex() << ":" << sockdata.mid(3, 1).toHex() << ":" << sockdata.mid(4.1).toHex();
bool ok;
quint8 res;
int num1=sockdata.mid(2, 1).toInt(&ok, 10);
int num2=sockdata.mid(3, 1).toInt(&ok, 10);
int oper=sockdata.mid(4, 1).toInt(&ok, 10);
qDebug() << "num1 " << num1 << " num2 " << num2 << " op " << oper;
To copy to clipboard, switch view to plain text mode
and i get zeroes
server sending auth question!!!
"ffdecb7002"
"cb" : "70" : "02"
num1 0 num2 0 op 0
result: 0 "ffdf00000000"
"ffdf00000000"
server sending auth question!!!
"ffdecb7002"
"cb" : "70" : "02"
num1 0 num2 0 op 0
result: 0 "ffdf00000000"
"ffdf00000000"
To copy to clipboard, switch view to plain text mode
Bookmarks