public void connect(InetAddress host, int port) throws IOException { socket = socketFactory.createSocket(); socket.connect(new InetSocketAddress(host, port), connectTimeout); onConnect(); }
public void connect(InetAddress host, int port, InetAddress localAddr, int localPort) throws IOException { socket = socketFactory.createSocket(); socket.bind(new InetSocketAddress(localAddr, localPort)); socket.connect(new InetSocketAddress(host, port), connectTimeout); onConnect(); }
public void connect(String hostname, int port) throws IOException { if (hostname == null) { connect(InetAddress.getByName(null), port); } else { this.hostname = hostname; socket = socketFactory.createSocket(); socket.connect(new InetSocketAddress(hostname, port), connectTimeout); onConnect(); } }
public void connect(String hostname, int port, InetAddress localAddr, int localPort) throws IOException { if (hostname == null) { connect(InetAddress.getByName(null), port, localAddr, localPort); } else { this.hostname = hostname; socket = socketFactory.createSocket(); socket.bind(new InetSocketAddress(localAddr, localPort)); socket.connect(new InetSocketAddress(hostname, port), connectTimeout); onConnect(); } }
/** * Connect to a host via a proxy. * @param host The host address to connect to. * @param port The port to connect to. * @param proxy The proxy to connect via. * @deprecated This method will be removed after v0.12.0. If you want to connect via a proxy, you can do this by injecting a {@link javax.net.SocketFactory} * into the SocketClient. The SocketFactory should create sockets using the {@link java.net.Socket#Socket(java.net.Proxy)} constructor. */ @Deprecated public void connect(InetAddress host, int port, Proxy proxy) throws IOException { if (JavaVersion.isJava7OrEarlier() && proxy.type() == Proxy.Type.HTTP) { // Java7 and earlier have no support for HTTP Connect proxies, return our custom socket. socket = new Jdk7HttpProxySocket(proxy); } else { socket = new Socket(proxy); } socket.connect(new InetSocketAddress(host, port), connectTimeout); onConnect(); }
/** * Connect to a host via a proxy. * @param hostname The host name to connect to. * @param port The port to connect to. * @param proxy The proxy to connect via. * @deprecated This method will be removed after v0.12.0. If you want to connect via a proxy, you can do this by injecting a {@link javax.net.SocketFactory} * into the SocketClient. The SocketFactory should create sockets using the {@link java.net.Socket#Socket(java.net.Proxy)} constructor. */ @Deprecated public void connect(String hostname, int port, Proxy proxy) throws IOException { this.hostname = hostname; if (JavaVersion.isJava7OrEarlier() && proxy.type() == Proxy.Type.HTTP) { // Java7 and earlier have no support for HTTP Connect proxies, return our custom socket. socket = new Jdk7HttpProxySocket(proxy); } else { socket = new Socket(proxy); } socket.connect(new InetSocketAddress(hostname, port), connectTimeout); onConnect(); }
/** On connection establishment, also initializes the SSH transport via {@link Transport#init} and {@link #doKex()}. */ @Override protected void onConnect() throws IOException { super.onConnect(); trans.init(getRemoteHostname(), getRemotePort(), getInputStream(), getOutputStream()); doKex(); }
public void connect(InetAddress host, int port) throws IOException { socket = socketFactory.createSocket(); socket.connect(new InetSocketAddress(host, port), connectTimeout); onConnect(); }
public void connect(InetAddress host, int port) throws IOException { socket = socketFactory.createSocket(); socket.connect(new InetSocketAddress(host, port), connectTimeout); onConnect(); }
public void connect(InetAddress host, int port, InetAddress localAddr, int localPort) throws IOException { socket = socketFactory.createSocket(); socket.bind(new InetSocketAddress(localAddr, localPort)); socket.connect(new InetSocketAddress(host, port), connectTimeout); onConnect(); }
public void connect(InetAddress host, int port, InetAddress localAddr, int localPort) throws IOException { socket = socketFactory.createSocket(); socket.bind(new InetSocketAddress(localAddr, localPort)); socket.connect(new InetSocketAddress(host, port), connectTimeout); onConnect(); }
public void connect(String hostname, int port, InetAddress localAddr, int localPort) throws IOException { if (hostname == null) { connect(InetAddress.getByName(null), port, localAddr, localPort); } else { this.hostname = hostname; socket = socketFactory.createSocket(); socket.bind(new InetSocketAddress(localAddr, localPort)); socket.connect(new InetSocketAddress(hostname, port), connectTimeout); onConnect(); } }
public void connect(String hostname, int port) throws IOException { if (hostname == null) { connect(InetAddress.getByName(null), port); } else { this.hostname = hostname; socket = socketFactory.createSocket(); socket.connect(new InetSocketAddress(hostname, port), connectTimeout); onConnect(); } }
/** * Connect to a host via a proxy. * @param host The host address to connect to. * @param port The port to connect to. * @param proxy The proxy to connect via. * @deprecated This method will be removed after v0.12.0. If you want to connect via a proxy, you can do this by injecting a {@link javax.net.SocketFactory} * into the SocketClient. The SocketFactory should create sockets using the {@link java.net.Socket#Socket(java.net.Proxy)} constructor. */ @Deprecated public void connect(InetAddress host, int port, Proxy proxy) throws IOException { if (JavaVersion.isJava7OrEarlier() && proxy.type() == Proxy.Type.HTTP) { // Java7 and earlier have no support for HTTP Connect proxies, return our custom socket. socket = new Jdk7HttpProxySocket(proxy); } else { socket = new Socket(proxy); } socket.connect(new InetSocketAddress(host, port), connectTimeout); onConnect(); }
/** * Connect to a host via a proxy. * @param hostname The host name to connect to. * @param port The port to connect to. * @param proxy The proxy to connect via. * @deprecated This method will be removed after v0.12.0. If you want to connect via a proxy, you can do this by injecting a {@link javax.net.SocketFactory} * into the SocketClient. The SocketFactory should create sockets using the {@link java.net.Socket#Socket(java.net.Proxy)} constructor. */ @Deprecated public void connect(String hostname, int port, Proxy proxy) throws IOException { this.hostname = hostname; if (JavaVersion.isJava7OrEarlier() && proxy.type() == Proxy.Type.HTTP) { // Java7 and earlier have no support for HTTP Connect proxies, return our custom socket. socket = new Jdk7HttpProxySocket(proxy); } else { socket = new Socket(proxy); } socket.connect(new InetSocketAddress(hostname, port), connectTimeout); onConnect(); }
/** On connection establishment, also initializes the SSH transport via {@link Transport#init} and {@link #doKex()}. */ @Override protected void onConnect() throws IOException { super.onConnect(); trans.init(getRemoteHostname(), getRemotePort(), getInputStream(), getOutputStream()); doKex(); }
/** On connection establishment, also initializes the SSH transport via {@link Transport#init} and {@link #doKex()}. */ @Override protected void onConnect() throws IOException { super.onConnect(); trans.init(getRemoteHostname(), getRemotePort(), getInputStream(), getOutputStream()); doKex(); }