Hi Rob
When you are connecting to a server thru socket,if
it is not connected it will throw exception.So catch
the exception and reconnect it.
bye
Rangarajan.S
--- Rob Hazlewood <[EMAIL PROTECTED]> wrote:
> can anyone tell me how i can determine if a socket
> is connected in java??
>
> I need to get a servlet to connect to a server and i
> am writing a thread which
> checks if socket is connected, and if it isn't the
> thread reconnects.
>
> I'd rather not send much data through the socket, as
> it will be in use by
> other threads.
>
> I found that Socket.getInetAddress sends the
> information of the server it is
> or was connected to (damn)
>
> thanks
> Rob
>
>
____________________________________________________________________
> Get free email and a permanent address at
> http://www.netaddress.com/?N=1
>
>
___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED]
> and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives:
>
http://archives.java.sun.com/archives/servlet-interest.html
> Resources:
>
http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help:
> http://www.lsoft.com/manuals/user/user.html
>
____________________________________________________________
Do You Yahoo!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html