Results 1 to 3 of 3

Thread: Fortune Server example

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Nov 2007
    Posts
    291
    Thanks
    85
    Thanked 1 Time in 1 Post

    Default Fortune Server example

    hi
    in the fortune server example i need a explanation for the below statement
    Qt Code:
    1. out << (quint16)(block.size() - sizeof(quint16));
    To copy to clipboard, switch view to plain text mode 

    which is inside the void Server::sendFortune() function.

    which can be found at the following url
    http://doc.trolltech.com/4.3/network...erver-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) .

    bye
    Last edited by jpn; 20th December 2007 at 16:08. Reason: Merged a double post

Similar Threads

  1. How to download any file through ftp server
    By thomasjoy in forum Qt Programming
    Replies: 1
    Last Post: 24th July 2007, 01:23
  2. How to ping a server ?
    By Nyphel in forum Newbie
    Replies: 2
    Last Post: 23rd April 2007, 11:27
  3. cannot connect to X server
    By jcr in forum Qt Programming
    Replies: 1
    Last Post: 18th April 2007, 14:22
  4. How a server can write "Hello" to a browser ?
    By probine in forum Qt Programming
    Replies: 2
    Last Post: 1st December 2006, 14:43
  5. synching client readings to server output
    By OnionRingOfDoom in forum Qt Programming
    Replies: 14
    Last Post: 28th January 2006, 18:15

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.