in C #, when the socket connection is completed, another node is informed about this before ending the connection, so restoring the node can update the connection status.
in Java, when I complete the communication line, another node reports that the connection is valid.
Do I need to implement a read loop (it makes sense) that reports the connection as lost when it gets -1 while reading (in C # it is 0, I think)?
Thank you for your understanding.
EDIT: thanks to you both. as I suspected and mentioned in my post, additional verification is required to confirm the status of the connection.
iTEgg source share