Check socket connection state java

29.06.2018 | by Admin
I need this control over the connection because when the server closed the connection i can do a send without errors but the second send return a 'fail'. It needs a new socket so that it can continue to listen to the original socket for connection requests while tending to the needs of the connected client. Dll can be used to know exactly the state as windows have it.
So when the client is no longer connected, you server socket won't block anymore. I want to control this situation. IsConnected returns always true once the client connects and even after the disconnect weird. But with the introduction of Scrip. Sorry but my example was developed in. This is a very simple free Java Utility which tells you if you could establish a socket connection to different hosts on specific ports. How much does Netflix cost a month.
You could still risc an exception when you read from the stream right after. How to Establish a Java Socket Connection. Makes the thread wait for input as long as the client is connected and therefore makes your program not do anything - except if you get some input. ReadLine blocks the execution of the thread.