Jung-Ho Ahn wrote:
>
> Hello,
>
> While I am trying to use NSS (actually JSS) in our HTTP server,
> I found that I could not a server socket which is
> waiting for a new connection, since a socket
> is locked during the 'accept' call.
> Is there any way to close that socket in another thread?
Jung-Ho and Jamie:
Is that a valid thing to do in Java? (to close a socket that's in use
by another thread) ??
The problem with closing an SSL socket while it's in use is that there's
a lot of context for the socket that is deallocated on close. If one thread
has pointers into that context, and while it is blocked on I/O the memory
is deallocated, it's crash time. (I know that Java doesn't have pointers,
but it seems like a similar problem exists. If you close/deallocate a
resource while another thread is using it, confusion must result. no?)
--
Nelson Bolyard Sun / Netscape Alliance
Disclaimer: I speak for myself, not for Netscape