java.net.SocketException: Socket closed
By the way thanks for this. Really appreciate it like you can not believe
The message seems pretty clear to me: the socket is closed. And since that's an error message telling you that, the implication is that the socket
shouldn't be closed. So that means you have to look at your code to find out why that is the case.
"Sending to a function" isn't standard Java terminology. However if your question could be translated as "If I call a method which closes a socket which
is passed as a parameter, does it close that socket?" then the answer is yes.