Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Sending whole file at a time in tcp communication
Forum Updated to NodeBB v4.3 + New Features

Sending whole file at a time in tcp communication

Scheduled Pinned Locked Moved General and Desktop
3 Posts 3 Posters 995 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    ecmanja
    wrote on last edited by
    #1

    hi,
    how can i send whole file at a time using tcp/ip , just like how we send file in gmail.. can anyone help me out regrading this.

    1 Reply Last reply
    0
    • G Offline
      G Offline
      gyll
      wrote on last edited by
      #2

      you take the file, wrap it in a plastic sheet (or you can pack it in a cardboard box if you like that better), and then push it down the pipe. it's that easy.

      1 Reply Last reply
      0
      • K Offline
        K Offline
        KA51O
        wrote on last edited by
        #3

        just use "QTcpSocket::write(QByteArray)":http://qt-project.org/doc/qt-4.8/qiodevice.html#write-3 QTcpSocket derives from QAbstractSocket, which in turn derives from QIODevice.

        Of course its not all that easy because you also need to send some meta data info (file type et al) along with the actual file.

        Another option would be to use "QNetworkAccessManager::post() ":http://qt-project.org/doc/qt-4.8/qnetworkaccessmanager.html#post

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved