Hello,

When opening a Socket I need a connection timeout.
Otherwise if the server is not available the program hangs unlimited while 
trying to open the Socket.

In the DefaultSocketFactory class a Socket is connected with:

public Socket createSocket(String host, int port)
throws UnknownHostException, IOException
{
  return new Socket(host, port);
}

What I need and what I propose would be:

public Socket createSocket(String host, int port, int timeout)
throws UnknownHostException, IOException
{
  Socket s = new Socket();
  s.connect(new InetSocketAddress(host,port),timeout);
}


Would it be possible to add a feature like that?


Regards,
Walter from Austria

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to