Socket(Proxy proxy) constructor from Socket has the following syntax.
public Socket(Proxy proxy)
In the following code shows how to use Socket.Socket(Proxy proxy) constructor.
import java.net.Proxy; import java.net.Socket; public class Main { public static void main(String[] argv) throws Exception { Proxy proxy = Proxy.NO_PROXY; Socket socket = new Socket(proxy); } }