csvivek
9th May 2008, 16:33
I have a data coming from a server on a TCP Connection and the data comes in network byte order.
is there any specific class in Qt that performs this conversion or should i use the native ntohs() methods of linux.
i tried using the native method call but that doesnot give any change!
can anyone please enlighten me on this....
struct{
quint16 i;
}
tcp->read((char*)i,sizeof(i));
ntohs(i);
i am working in QT4.2.2 Red Hat Linux
is there any specific class in Qt that performs this conversion or should i use the native ntohs() methods of linux.
i tried using the native method call but that doesnot give any change!
can anyone please enlighten me on this....
struct{
quint16 i;
}
tcp->read((char*)i,sizeof(i));
ntohs(i);
i am working in QT4.2.2 Red Hat Linux