C/S soekct programming problems. Why is the c client still in the connection status when the S client prompts that C has been disconnected?

Source: Internet
Author: User

I used the socket control that comes with D6 and made a C/SProgram. C sends image data to the S end and adds the method that can be reconnected after a network error occurs. After the connection starts, the image data can be normally transmitted to the S end. In addition, after manual disconnection (for example, the send is closed, the IP address is modified, or the IP address is dropped), it can be automatically connected. But 5 to 10 hours later (the time is not fixed ). The connection between C and S is faulty. The C-end is disconnected (the S-end has a display function), and the C-end has no response. Therefore, the C end also thinks that it is in the connection status. But that's strange. Is C disconnected during event processing on the send? Restart the C-end and run properly again!
I thought it was a control problem and changed the idtcpclient and idtcpserver controls of Indy. The results also show up-after a period of normal operation. It will no longer be passed in. The S end also prompts that the C end has been disconnected. The C end has stopped.
Later, two sets of controls were used to test the connection between C and S, and the other was to send image data. The problem persists.
Can someone help me. I have used many methods to solve this problem? In principle, the send prompts disconnection. The C end should also be disconnected.

Continue to read c/s soekct programming questions. Why does the C end still have a connection status when the S end prompts that C has been disconnected? The full text...

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.