Thanks for the effective and quick response.
It works,,,,,
Now i use
{
out << hand_shake_pkt.Id;
out << hand_shake_pkt.BlockSize;
for(int i = 0; i < 2; ++i)
out << hand_shake_pkt.Reserved1[i];
out << hand_shake_pkt.FeedType;
for(int i = 0; i < 3; ++i)
out << hand_shake_pkt.Reserved2[i];
out << hand_shake_pkt.Major;
out << hand_shake_pkt.Minor;
for(int i = 0; i < 21; ++i)
out << hand_shake_pkt.ProgramId[i];
return out;
}
{
in >> hand_shake_pkt.Id;
in >> hand_shake_pkt.BlockSize;
for(int i = 0; i < 2; ++i)
in >> hand_shake_pkt.Reserved1[i];
in >> hand_shake_pkt.FeedType;
for(int i = 0; i < 3; ++i)
in >> hand_shake_pkt.Reserved2[i];
in >> hand_shake_pkt.Major;
in >> hand_shake_pkt.Minor;
for(int i = 0; i < 21; ++i)
in >> hand_shake_pkt.ProgramId[i];
return in;
}
QDataStream &operator <<(QDataStream &out, const hShakeAckPkt &hand_shake_pkt)
{
out << hand_shake_pkt.Id;
out << hand_shake_pkt.BlockSize;
for(int i = 0; i < 2; ++i)
out << hand_shake_pkt.Reserved1[i];
out << hand_shake_pkt.FeedType;
for(int i = 0; i < 3; ++i)
out << hand_shake_pkt.Reserved2[i];
out << hand_shake_pkt.Major;
out << hand_shake_pkt.Minor;
for(int i = 0; i < 21; ++i)
out << hand_shake_pkt.ProgramId[i];
return out;
}
QDataStream &operator >>(QDataStream &in, hShakeAckPkt &hand_shake_pkt)
{
in >> hand_shake_pkt.Id;
in >> hand_shake_pkt.BlockSize;
for(int i = 0; i < 2; ++i)
in >> hand_shake_pkt.Reserved1[i];
in >> hand_shake_pkt.FeedType;
for(int i = 0; i < 3; ++i)
in >> hand_shake_pkt.Reserved2[i];
in >> hand_shake_pkt.Major;
in >> hand_shake_pkt.Minor;
for(int i = 0; i < 21; ++i)
in >> hand_shake_pkt.ProgramId[i];
return in;
}
To copy to clipboard, switch view to plain text mode
Bookmarks