You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Daniel F. Savarese" <df...@savarese.org> on 2008/03/18 02:16:26 UTC

Re: Opening Sockets in commons.net project

In message <47...@pressetext.at>, Walter Sunk writes:
>When opening a Socket I need a connection timeout.

See question #2 at:
  http://wiki.apache.org/commons/Net/FrequentlyAskedQuestions

>What I need and what I propose would be:
>
>public Socket createSocket(String host, int port, int timeout)
...
>Would it be possible to add a feature like that?

That should probably have been done for Commons Net 2.0, but it
looks like instead SocketClient calls the no-arg
SocketFactory.createSocket() and then Socket.connect(...) (using the
timeout set from SocketClient.setConnectTimeout(...)), which defeats
the purpose of delegating the details of socket creation to the
factory.  In any case, the functionality appears to be there already.

daniel

o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o o-o-o-o-o-o-o-o-o-o-o-o-o-o
                    Igfip                      o    s a v a r e s e
The strategic alternative for online games(tm).o   software research
            http://www.igfip.com/              o http://www.savarese.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org