Does closing the inputstream of a socket also close the socket connection?

Yes, closing the input stream closes the socket. You need to use the shutdownInput method on socket, to close just the input stream:

//do sth with fromSocket ... and close it 
socket.shutdownInput(); 

Then, you can still send to the output socket

//then write to socket again 
toSocket.print("is socket connection still available?\r\n"); 
//close socket 
socket.close(); 

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)