How to send large files (2-3 GB) over the network using sockets? I have written a socket program which sends files from the server to client. But it is taking a very long time to send even 300 MB.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Determine whether the network is the bottleneck and compress the files before sending if it is. Use
DeflaterOutputStreamin the sender andInflaterInputStreamin the receiver. (Don’t do this if the files are already compressed; many media formats include compression.)