I'm writing socket programs in Java and sometimes get this error. I have some questions:
1) I use Eclipse to run my socket apps and click "terminate" at last but sometimes still get that error. Why?
2) Is there any way to close port programmatically? Something like this:
if(isPortOpen(portNumber)) {
closePort(portNumber);
}
//// Run my app here
3) Is there any way to avoid this error (in programming or OS)?