Results 1 to 20 of 22

Thread: Fastest way to transfer Data over tcp

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2011
    Posts
    195
    Thanks
    49
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Fastest way to transfer Data over tcp

    Hi,
    Maybe you can help me...

    What is the fastest way to transmit Objects of classes over Tcp. I know Xml and I can comprime it,

    f.e:
    Qt Code:
    1. <Map>
    2. <Entry>
    3. <Key>45</Key>
    4. <Value>
    5. <Object>
    6. <Member1>...</Member1>
    7. <Member2>...</Member2>
    8. ...
    9. </Object>
    10. </Value>
    11. </Entry>
    12. etc. ....
    To copy to clipboard, switch view to plain text mode 

    but is it the fastes way?

    thank u ; )

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Fastest way to transfer Data over tcp

    Define what you mean by "fastest".
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Apr 2011
    Posts
    195
    Thanks
    49
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Fastest way to transfer Data over tcp

    I mean speedy...

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Fastest way to transfer Data over tcp

    In terms of writing code, data transfer or what else?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    Join Date
    Apr 2011
    Posts
    195
    Thanks
    49
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Fastest way to transfer Data over tcp

    sorry, I mean data transfer...

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Fastest way to transfer Data over tcp

    The fastest way is to develop your own binary protocol that will only transfer information that is really required, making use of some implicit domain knowledge like default values of fields in particular objects.

    By the way, next time please post such questions on "General Programming" forum.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  7. The following user says thank you to wysota for this useful post:

    Qiieha (20th July 2012)

  8. #7
    Join Date
    Apr 2011
    Posts
    195
    Thanks
    49
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Fastest way to transfer Data over tcp

    Should I use the Hessian Protocol?
    Last edited by Qiieha; 20th July 2012 at 10:55.

  9. #8
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Fastest way to transfer Data over tcp

    You can use any protocol you want. But like I said, if you want "fastest" then you need your own protocol.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  10. #9
    Join Date
    Apr 2011
    Posts
    195
    Thanks
    49
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Fastest way to transfer Data over tcp

    so there is a simple protocol

    Qt Code:
    1. size //the socket knows, if all data is here
    2. whatfor //command
    3. data //the map f.e
    To copy to clipboard, switch view to plain text mode 

    Can u show me a common protocol for a QMap<QString,QString>, please.

  11. #10
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Fastest way to transfer Data over tcp

    No, I can't. You need to develop it on your own considering your particular application needs. It's not something you can do in two minutes.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  12. #11
    Join Date
    Apr 2011
    Posts
    195
    Thanks
    49
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Fastest way to transfer Data over tcp

    I never worked with binary protocols...

Similar Threads

  1. Replies: 4
    Last Post: 26th September 2011, 09:32
  2. USB/Bluetooth Data Transfer
    By awaisj2003 in forum Newbie
    Replies: 1
    Last Post: 31st August 2010, 11:44
  3. Data transfer between QIODevice
    By benlau in forum Qt Programming
    Replies: 0
    Last Post: 24th February 2010, 05:59
  4. Transfer Data Between Dialogs
    By umulingu in forum Qt Programming
    Replies: 4
    Last Post: 19th February 2010, 08:35

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.