Parsing UDP data failure (solved)

  • I successfully read 1st byte. My question is how to read subsequent next 4 bytes and subsequent 1 bytes till last bit.
    QDataStream in(UDPdataRec); //UDPdataRec is 17 bytes
    qint8 n;

  • I can solved the problem by setting different variable size
    qint8 a;
    qint32 b;
    qint64 c;

    and push QDatastream into each variable by sequence using in keyword.


Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.