isond
asked on
HSM connection
Hi,
I am writing a program to send commands to a HSM. This is done using sockets. I have a problem that the socket does not seem to disconnect imediately after calling the close method on the socket. It seems to wait for a timeout before disconnecting, is there anyway that I can force the connection to be dropped straight away as we only have a limited number of HSM connections.
Thanks,
Darren.
I am writing a program to send commands to a HSM. This is done using sockets. I have a problem that the socket does not seem to disconnect imediately after calling the close method on the socket. It seems to wait for a timeout before disconnecting, is there anyway that I can force the connection to be dropped straight away as we only have a limited number of HSM connections.
Thanks,
Darren.
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
- To be PAQ'ed and points NOT refunded
Please leave any comments here within the
next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !
girionis
Cleanup Volunteer
I will leave a recommendation in the Cleanup topic area that this question is:
- To be PAQ'ed and points NOT refunded
Please leave any comments here within the
next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !
girionis
Cleanup Volunteer
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
try assigning null to ref after calling close
also close all the streams opened by that socket befor closing it
try
{
//close input& output stream opened by this socket
instream.close();
instream=null;
outstream.close();
outstream = null;
socket.close();
socket=null;
}
catch(IOException ioe)
{
ioe.printStackTrace();
}