Results 1 to 7 of 7

Thread: QDataStream extra bytes in output?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #4
    Join Date
    Jul 2007
    Posts
    27
    Thanks
    10
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QDataStream extra bytes in output?

    I've ruled out the extra bytes being the version, as they change depending on how much the user types in. So I'm thinking that that it probably is the length.

    However, I've re-written my program in two parts, a server and a client... and I've followed the examples given in 'threaded fortune server' and 'fortune client', but I'm still getting extra "junk" somewhere.

    When I send data from the client to the server, I send the number of bytes being sent as a serialized quint16 (as in fortune server), and I extract that number on the server side and test it against bytesAvailable() (as in fortune client). Then when the server sends back to the client, I follow the same step, I send the number of bytes to be sent as a serialized quint16.

    Somehow I'm still getting "junk" somewhere.

    I've attached my server and client code in .zip format.
    Attached Files Attached Files

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.