commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel F. Savarese" <...@savarese.org>
Subject Re: Opening Sockets in commons.net project
Date Tue, 18 Mar 2008 01:16:26 GMT

In message <47DE7F33.6050103@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


Mime
View raw message