Problem solving using TCP for continuous file transfer

Source: Internet
Author: User

Problem solving using TCP for continuous file transfer

Today, when doing the project, we need the server to send a different number of pictures to the client according to the user's information. So want to do a continuous transmission file, but encountered in the process of a problem is that the client does not recognize the data flow of different files, resulting in the transmission of most files in the end of the client only one file in the acceptance of data, Everything is passed into a data inside.

This problem bothered me one day, and finally on the Internet to find the corresponding solution, before passing each person, the file to be transmitted to the size of the past, when the client to accept the data at all times to compare the size of the accepted file, equal to or greater than the size of the file transmitted, it means that the file has been transmitted.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.