• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Is it impossible to release a socket so you can bind to the same ip:port twice?

Android 6.0 API 23:
I'm using java.net.Socket. I want to release the hostname: port binding so a client phone can: connect, crash so the app has to be restarted on the client phone, then reconnect to the same IP and port without restarting the server app. Is this possible or do I have to start a new server listening on a different port? I'm not using asynchronous communication. What I'm using is more old school.
 
No reason why you can't reconnect to the socket, provided it's closed down correctly.
 
Back
Top Bottom