java socket transmit segmented file

118 Views Asked by At

I use java socket to transmit file.Because the speed is too slow , so I segment file into parts and transmit them by socket(different ports) and multi threads,so now the time of transmitting file will be the time of last part arrived at client(before last part arrived,some small parts had arrived). I compare the original method and my new method, I find that although the size of original is bigger than the last part of my new method , sometimes , the time of my method is larger than original.Can someone tell me why?

0

There are 0 best solutions below