how to speed up data transfer between client and server in Winsock
-
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
-
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
-
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
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 thesend
call.Veni, vidi, vici.
-
Without knowing anything about your programs, your computers or your network it is impossible to make a useful suggestion.
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
andSO_RCVBUF
socket options are definitely among these tweakable things, I used 1-2 megabytes if I remember right. -
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
andSO_RCVBUF
socket options are definitely among these tweakable things, I used 1-2 megabytes if I remember right. -
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
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
-
Without knowing anything about your programs, your computers or your network it is impossible to make a useful suggestion.
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
-
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
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