Three solutions to read blocking in java socket long connection
•
Java
There are three solutions:
1. The length of data to be sent is agreed. For example, keepalive of HTTP must rely on this content length. 2. Set the timeout time. According to my experience, it is only valid at the socket level
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码