Results 1 to 5 of 5

Thread: how to send structure to tcp spcket

  1. #1
    Join Date
    Mar 2011
    Location
    delhi
    Posts
    45
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Exclamation how to send structure to tcp spcket

    hi all pls tell how we can send structure(that have data memebers have value) to tcp socket and read that



    thanks with regards:
    gauravg

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: how to send structure to tcp spcket

    However you want, one byte at a time.

  3. #3
    Join Date
    Mar 2011
    Location
    delhi
    Posts
    45
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Exclamation Re: how to send structure to tcp spcket

    write all structure at a time or one byte at at a time pls specift both the cases.



    thanks with regards:
    gauravg

  4. #4
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: how to send structure to tcp spcket

    QTcpSocket is a QIOdevice. Use QIODevice::write(), QIODevice::read(), possibly even QTextStream or QDataStream, the resources that are already available to you, and some of your own initiative.

  5. #5
    Join Date
    Mar 2011
    Location
    delhi
    Posts
    45
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: how to send structure to tcp spcket

    write whole structure at a time

Similar Threads

  1. Replies: 12
    Last Post: 26th June 2011, 11:26
  2. Replies: 1
    Last Post: 13th April 2011, 11:24
  3. Tree structure
    By ikm in forum Newbie
    Replies: 1
    Last Post: 7th August 2009, 20:19
  4. Folder structure of Qt SDK
    By piotr.dobrogost in forum Installation and Deployment
    Replies: 19
    Last Post: 14th July 2009, 09:17
  5. Data Structure help!
    By darshan in forum Newbie
    Replies: 8
    Last Post: 18th February 2009, 12:47

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.