hi all,
After making a tcp connection to a server, I close my linux application and Socket.close() is called.
Checking netstat -pant, I see the connection is in TIME_WAIT status.
This prevents me from making an immediate connection back to the server since I'm using the same port to connect from. Instead, I have to wait for the connection to timeout of the TIME_WAIT status before I can reconnect again.
I've played around -without luck- with the socket methods: set_so_timeout(), set_keepalive(), set_so_linger(), and set_reuseaddr() - exact spelling of the method may not be right in this post.
My question is HOW do I get the connection out of the TIME_WAIT status so I can instantly make a connection again?
Please let me know.
Thanks, jbu