Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Writing a java.net.SocketImplFactory

Tags:

java

sockets

The javadoc for SocketImplFactory specifically mentions that "An application, by changing the socket factory that creates the socket implementation, can configure itself to create sockets appropriate to the local firewall."

However, in order to connect to the firewall in question, one would need a real socket to do the real connection. With the default SocketImplFactory replaced, how does one go about getting a real socket?

I know that java.net.PlainSocketImpl and java.net.SocksSocketImpl are available on Sun's Java, but is there any way to do it in a way that is portable between JVMs?

like image 239
Dolda2000 Avatar asked Jan 18 '10 02:01

Dolda2000


1 Answers

There is some information about the thinking behind this documentation here

like image 169
Damien B Avatar answered Oct 30 '22 07:10

Damien B