Simple question, I know that if you just use “.close()” or just set null on a socket, you still can not reuse it. But if you were to set it to null and then say ” = new Socket();” on the used socket, can you use it again?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
When you say
new Socket();it won’t be using already closed socket, it gets you newSocket. So, that is not re-use. You are just re-using the reference variable, notSocketobject.