public Socket (Proxy proxy)

Creates an unconnected socket, specifying the type of proxy, if any, that should be used regardless of any other settings.

If there is a security manager, its checkConnect method is called with the proxy host address and port number as its arguments. This could result in a SecurityException.

Examples:

Parameters:
proxy    a Proxy object specifying what kind of proxying should be used.

Exceptions:
IllegalArgumentException    if the proxy is of an invalid type or null.
SecurityException    if a security manager is present and permission to connect to the proxy is denied.

See also:
java.net.ProxySelector, java.net.Proxy

Since:  1.5