babu198649
20th December 2007, 15:43
hi
in the fortune server example i need a explanation for the below statement
out << (quint16)(block.size() - sizeof(quint16));
which is inside the void Server::sendFortune() function.
which can be found at the following url
http://doc.trolltech.com/4.3/network-fortuneserver-server-cpp.html
while we need the size of the block to be specified at the first two bytes
why the size of the block is subtracted with the 2bytes(i.e quint16):confused: .
bye:)
in the fortune server example i need a explanation for the below statement
out << (quint16)(block.size() - sizeof(quint16));
which is inside the void Server::sendFortune() function.
which can be found at the following url
http://doc.trolltech.com/4.3/network-fortuneserver-server-cpp.html
while we need the size of the block to be specified at the first two bytes
why the size of the block is subtracted with the 2bytes(i.e quint16):confused: .
bye:)