public static Socket createPlainSocket(String host, int port) throws IOException { InetAddress address = createAddres(host); Socket socket = new Socket(address, port); socket.setReuseAddress(true); socket.setTcpNoDelay(true); socket.setKeepAlive(true); return socket; }
public static Socket createSSLSocket(ISVNSSLManager manager, String host, int port) throws IOException { manager = manager == null ? DEFAULT_SSL_MANAGER : manager; Socket sslSocket = manager.getSSLContext().getSocketFactory().createSocket(createAddres(host), port); sslSocket.setReuseAddress(true); sslSocket.setTcpNoDelay(true); sslSocket.setKeepAlive(true); return sslSocket; }
public static Socket createPlainSocket(String host, int port, int connectTimeout, int readTimeout, ISVNCanceller cancel) throws IOException, SVNCancelException { InetAddress address = createAddres(host); Socket socket = new Socket(); InetSocketAddress socketAddress = new InetSocketAddress(address, port); connect(socket, socketAddress, connectTimeout, cancel); socket.setReuseAddress(true); socket.setTcpNoDelay(true); socket.setKeepAlive(true); socket.setSoLinger(true, 0); socket.setSoTimeout(readTimeout); return socket; }
public static Socket createSSLSocket(KeyManager[] keyManagers, TrustManager trustManager, String host, int port, int connectTimeout, int readTimeout, ISVNCanceller cancel) throws IOException, SVNCancelException { InetAddress address = createAddres(host); Socket sslSocket = createSSLContext(keyManagers, trustManager).getSocketFactory().createSocket(); InetSocketAddress socketAddress = new InetSocketAddress(address, port); connect(sslSocket, socketAddress, connectTimeout, cancel); sslSocket.setReuseAddress(true); sslSocket.setTcpNoDelay(true); sslSocket.setKeepAlive(true); sslSocket.setSoLinger(true, 0); sslSocket.setSoTimeout(readTimeout); ((SSLSocket) sslSocket).setEnabledProtocols(new String[] {"SSLv3"}); return sslSocket; }
public static Socket createPlainSocket(String host, int port, int connectTimeout, int readTimeout, ISVNCanceller cancel) throws IOException, SVNException { InetAddress address = createAddres(host); Socket socket = new Socket(); int bufferSize = getSocketReceiveBufferSize(); if (bufferSize > 0) { socket.setReceiveBufferSize(bufferSize); } InetSocketAddress socketAddress = new InetSocketAddress(address, port); connect(socket, socketAddress, connectTimeout, cancel); socket.setReuseAddress(true); socket.setTcpNoDelay(true); socket.setKeepAlive(true); socket.setSoLinger(true, 0); socket.setSoTimeout(readTimeout); return socket; }
public static Socket createPlainSocket(String host, int port, int connectTimeout, int readTimeout, ISVNCanceller cancel) throws IOException, SVNCancelException { InetAddress address = createAddres(host); Socket socket = new Socket(); int bufferSize = getSocketReceiveBufferSize(); if (bufferSize > 0) { socket.setReceiveBufferSize(bufferSize); } InetSocketAddress socketAddress = new InetSocketAddress(address, port); connect(socket, socketAddress, connectTimeout, cancel); socket.setReuseAddress(true); socket.setTcpNoDelay(true); socket.setKeepAlive(true); socket.setSoLinger(true, 0); socket.setSoTimeout(readTimeout); return socket; }
public static Socket createSSLSocket(KeyManager[] keyManagers, TrustManager trustManager, String host, int port, int connectTimeout, int readTimeout, ISVNCanceller cancel) throws IOException, SVNCancelException { InetAddress address = createAddres(host); Socket sslSocket = createSSLContext(keyManagers, trustManager).getSocketFactory().createSocket(); int bufferSize = getSocketReceiveBufferSize(); if (bufferSize > 0) { sslSocket.setReceiveBufferSize(bufferSize); } InetSocketAddress socketAddress = new InetSocketAddress(address, port); connect(sslSocket, socketAddress, connectTimeout, cancel); sslSocket.setReuseAddress(true); sslSocket.setTcpNoDelay(true); sslSocket.setKeepAlive(true); sslSocket.setSoLinger(true, 0); sslSocket.setSoTimeout(readTimeout); ((SSLSocket) sslSocket).setEnabledProtocols(new String[] {"SSLv3"}); return sslSocket; }
private static Socket _createSSLSocket(KeyManager[] keyManagers, TrustManager trustManager, String host, int port, int connectTimeout, int readTimeout, ISVNCanceller cancel, boolean withSNIsupport) throws IOException, SVNException { InetAddress address = createAddres(host); Socket sslSocket = createSSLContext(keyManagers, trustManager).getSocketFactory().createSocket(); int bufferSize = getSocketReceiveBufferSize(); if (bufferSize > 0) { sslSocket.setReceiveBufferSize(bufferSize); } if (withSNIsupport) { sslSocket = setSSLSocketHost(sslSocket, host); } InetSocketAddress socketAddress = new InetSocketAddress(address, port); sslSocket.setReuseAddress(true); sslSocket.setTcpNoDelay(true); sslSocket.setKeepAlive(true); sslSocket.setSoLinger(true, 0); sslSocket.setSoTimeout(readTimeout); sslSocket = configureSSLSocket(sslSocket); connect(sslSocket, socketAddress, connectTimeout, cancel); return sslSocket; }