Hi Vinoth Kumar,

You could call explicitly the disconnect() method but I don't know if in your client you can properly identify how trigger the call.
In any case TIME_WAIT and CLOSE_WAIT on the tcp sockets are strongly dependent on any network intermediary like proxies or other devices in the middle between client and server.

Regards,
Giuseppe