Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. how to speed up data transfer between client and server in Winsock

how to speed up data transfer between client and server in Winsock

Scheduled Pinned Locked Moved C / C++ / MFC
sysadminjsonperformancetutorialquestion
8 Posts 6 Posters 0 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.
  • T Offline
    T Offline
    Tu X ong
    wrote on last edited by
    #1

    I made two program , client and server. The client program send a big data to the server using "send" windows API. I used a thread to send the data. in this case , my server took 5 minutes to receive 500Mb data. I want to reduce the time it takes.there any way to do that ?

    tú xương

    L C M A 4 Replies Last reply
    0
    • T Tu X ong

      I made two program , client and server. The client program send a big data to the server using "send" windows API. I used a thread to send the data. in this case , my server took 5 minutes to receive 500Mb data. I want to reduce the time it takes.there any way to do that ?

      tú xương

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Without knowing anything about your programs, your computers or your network it is impossible to make a useful suggestion.

      P M 2 Replies Last reply
      0
      • T Tu X ong

        I made two program , client and server. The client program send a big data to the server using "send" windows API. I used a thread to send the data. in this case , my server took 5 minutes to receive 500Mb data. I want to reduce the time it takes.there any way to do that ?

        tú xương

        C Offline
        C Offline
        CPallini
        wrote on last edited by
        #3

        You first have to test how your average speed (about 13 Mbit/s) compares with the speed of your network and then (if it is the case) investigate to find out the bottleneck. You should probably first check your own code, I strongly doubt the (possible) bottleneck is caused by the send call.

        Veni, vidi, vici.

        1 Reply Last reply
        0
        • L Lost User

          Without knowing anything about your programs, your computers or your network it is impossible to make a useful suggestion.

          P Offline
          P Offline
          pasztorpisti
          wrote on last edited by
          #4

          Exactly. On our internal network that is wired with terribly expensive switches it was possible to reach constant 100MByte/sec with good hardware and windows but some things had to be tweaked for that. The SO_SNDBUF and SO_RCVBUF socket options are definitely among these tweakable things, I used 1-2 megabytes if I remember right.

          L 1 Reply Last reply
          0
          • P pasztorpisti

            Exactly. On our internal network that is wired with terribly expensive switches it was possible to reach constant 100MByte/sec with good hardware and windows but some things had to be tweaked for that. The SO_SNDBUF and SO_RCVBUF socket options are definitely among these tweakable things, I used 1-2 megabytes if I remember right.

            L Offline
            L Offline
            Lost User
            wrote on last edited by
            #5

            I think you should tell the OP about that.

            1 Reply Last reply
            0
            • T Tu X ong

              I made two program , client and server. The client program send a big data to the server using "send" windows API. I used a thread to send the data. in this case , my server took 5 minutes to receive 500Mb data. I want to reduce the time it takes.there any way to do that ?

              tú xương

              M Offline
              M Offline
              Munchies_Matt
              wrote on last edited by
              #6

              Get a faster network card....

              "The whole idea that carbon dioxide is the main cause of the recent global warming is based on a guess that was proved false by empirical evidence during the 1990s." climate-models-go-cold

              1 Reply Last reply
              0
              • L Lost User

                Without knowing anything about your programs, your computers or your network it is impossible to make a useful suggestion.

                M Offline
                M Offline
                Munchies_Matt
                wrote on last edited by
                #7

                Come on Richard, we all know moving them closer together makes it faster! :)

                "The whole idea that carbon dioxide is the main cause of the recent global warming is based on a guess that was proved false by empirical evidence during the 1990s." climate-models-go-cold

                1 Reply Last reply
                0
                • T Tu X ong

                  I made two program , client and server. The client program send a big data to the server using "send" windows API. I used a thread to send the data. in this case , my server took 5 minutes to receive 500Mb data. I want to reduce the time it takes.there any way to do that ?

                  tú xương

                  A Offline
                  A Offline
                  ahmad_ali
                  wrote on last edited by
                  #8

                  If your connection is faster, then yes. In general, to achieve maximum performance, you will need a high performance protocol and I am not sure the Send API you are referring to falls into that category. Typical characteristics for high performance protocols are: * UDP based * Packet loss tolerant * Latency tolerant You may have to write your own protocol, or Google for "high performance open source UDP file transfer" and you may find something. Regards

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups