How to check if a server has disconnected a socket

From: Jarle Jacobsen (jarlejSP_at_MREMOVE@writeme.com)
Date: 08/31/04


Date: Tue, 31 Aug 2004 16:28:11 +0200

Hi.

Can anybody help me with the following?

I'm using java.net.Socket to connect to a server. The socket is part of a
client application, and I connect to the server at startup. The application
should be able to handle a lost connection due to a restart of the server or
any other reason. Is it a way to check if the socket connection is still
connected or if the connection has been reset?

Jarle



Relevant Pages

  • Re: Writing a windows service with a socket interface.
    ... It's FAR easier than direct socket ... > and sends a response back to the client. ... Or perhaps if the IP address of the server was modified ... > connection open, I would implement a sort of connection pool of course. ...
    (microsoft.public.dotnet.framework)
  • Cable modem/router causes error 10054, "Connection was forcibly reset by remote host"
    ... If there is no activity on the socket for five minutes, ... no resets are issued by our server or anything else visible on the wire. ... same to be true with an FTP client accessing an FTP site totally unrelated ... client, made five unsuccessful attempts to use its existing connection, then ...
    (microsoft.public.win32.programmer.networks)
  • Re: .Net Scalability problem
    ... LoadRunner will peak out a server with a few virtual users. ... To get an idea of load, ... Fire off the test client and watch the number of ... > So I think that the MTC generate concurrent connection and per ...
    (microsoft.public.dotnet.framework.adonet)
  • Socket events in vb.net compact framework
    ... I am developing a Client / Server App using Visual Studio 2003 and a Smart ... Device App and a TCP/IP Socket connection. ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Socket switch delay
    ... both at the client and at the server (and why ... would you set the send buffer size to zero on a non-overlapped ... One glaring error is your client does ... So when you use a single socket, ...
    (microsoft.public.win32.programmer.networks)