Results 1 to 7 of 7

Thread: QDataStream extra bytes in output?

Threaded View

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

    Default QDataStream extra bytes in output?

    I have created a small TCP server application and attached it to this message.

    Notice in server_thread.cpp, there are two "BOOKMARK" comments.

    The user connects and types in some text, the server is supposed to echo it back to them preceded by two less-than symbols and one space ("<< ").

    Notice that the number of bytes to write is ALWAYS four bytes more than what was read from the user (there's a print statement near both BOOKMARKs). Where are these four extra bytes coming from?

    I've even tried taking out the "<< ", but that's not where the extra bytes are coming from.

    Any suggestions would be appreciated.

    Sincerely,

    Gordon E.
    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.