Seb Barre wrote:

> I'm assuming you have one thread that "listens" on your connection port, 
> accepts the connection, and hands off the connected socket to another 
> separate thread that handles the actual sending/receiving of data?
> 


        This is correct.


> If your main listening thread isn't handing off the socket to another 
> thread and is the same thread that actually sends/receives the data, 
> then you won't be able to connect again until it times out.
> 
> Have you tried initiating two connections at once to your server, to see 
> if the listening thread properly unblocks once it's handed off the 
> socket to the actual client-handling thread?


        We've tried this, and it works properly.


> 
> Also, make sure that you aren't swallowing the EOFException (when the 
> socket gets cut off) before your thread can actually figure out that 
> it's not needed anymore because the socket is gone.
> 
> Hope that helps..
> 
> 


        I don't think this could be it.  The method that copies the data from the 
InputStream (to a local file) to the OutputStream (the socket) does not 
catch any exception, it passes them all up.  The actual method that is 
responsible for handleing the connection has a try catch finally, and 
the finally closes the socket so if there is an exception thrown that 
should handle it.

        The response did help, thank you.  I'm getting ready to do a tcpdup as 
another reader suggested to see if it can offer any help.

        Again, thanks!


----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to