closesocket

Whats the difference between a socket which is open and a socket which is connected?

☆樱花仙子☆ 提交于 2019-11-29 09:29:53
The Java Socket class has two methods isClosed and isConnected to check whether the socket is closed or connected respectively. I wanted to know what's the difference between a TCP socket which is only open and a TCP socket which is open and connected, and how is this different from UDP. Russell Gutierrez To put things simply, a Socket that is open is a socket that is either waiting for connection or has successfully connected with another Socket . When a socket has been closed , it means that this socket is no longer available for connection, and that it's resources has already been released.

Whats the difference between a socket which is open and a socket which is connected?

≯℡__Kan透↙ 提交于 2019-11-28 03:02:32
问题 The Java Socket class has two methods isClosed and isConnected to check whether the socket is closed or connected respectively. I wanted to know what's the difference between a TCP socket which is only open and a TCP socket which is open and connected, and how is this different from UDP. 回答1: To put things simply, a Socket that is open is a socket that is either waiting for connection or has successfully connected with another Socket . When a socket has been closed , it means that this socket