Socket Server programming FAQ

Source: Internet
Author: User
Tags socket connect

1) When sokcet of a client does not send data for a long time, how does the server kill sokcet, that is, closesocket;

2) When the socket keepalive mechanism times out, what status will the select return? What can the sokcet In the SELECT statement read with the Recv?

3) How to kill an illegal attack, that is, to connect only to the server without sending data, resulting in depletion of the socket on the server;

4) how to determine whether the client sends illegal data and filter out illegal data as soon as possible;

5) how to determine whether a sokcet connection is normal, such as client disconnection and restart;

6) will it be blocked if keepalive is not set for socket select?

7) How does the socket connect function set timeout?

8) How can I determine whether the port number is occupied?

Another function of the BIND port is to determine whether the port number is occupied. This is very useful when the RTSP connection is established, because a port of BIND will return an error if it is occupied.

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.