aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenny Root <kenny@the-b.org>2015-10-08 09:47:04 -0700
committerKenny Root <kenny@the-b.org>2015-10-08 09:47:06 -0700
commit08ab36bc773b1c270585d8020a65d6cd5e84a207 (patch)
treee58f3999f111f4fcf1adcffde9d0c2849e8f8ab8
parent500b943a7d064101bc258a5c81fed9bf2567d7b1 (diff)
downloadsshlib-08ab36bc773b1c270585d8020a65d6cd5e84a207.tar.gz
sshlib-08ab36bc773b1c270585d8020a65d6cd5e84a207.tar.bz2
sshlib-08ab36bc773b1c270585d8020a65d6cd5e84a207.zip
Remove tcpNoDelay setting
This conflicts with more advanced proxy transports that don't support this, so just remove it altogether.
-rw-r--r--sshlib/src/main/java/com/trilead/ssh2/Connection.java25
-rw-r--r--sshlib/src/main/java/com/trilead/ssh2/transport/TransportManager.java11
2 files changed, 0 insertions, 36 deletions
diff --git a/sshlib/src/main/java/com/trilead/ssh2/Connection.java b/sshlib/src/main/java/com/trilead/ssh2/Connection.java
index 8582ea4..1f605e0 100644
--- a/sshlib/src/main/java/com/trilead/ssh2/Connection.java
+++ b/sshlib/src/main/java/com/trilead/ssh2/Connection.java
@@ -105,8 +105,6 @@ public class Connection
private TransportManager tm;
- private boolean tcpNoDelay = false;
-
private ProxyData proxyData = null;
private Vector<ConnectionMonitor> connectionMonitors = new Vector<ConnectionMonitor>();
@@ -812,8 +810,6 @@ public class Connection
"The connect() operation on the socket timed out.").initCause(se);
}
- tm.setTcpNoDelay(tcpNoDelay);
-
/* Wait until first KEX has finished */
ConnectionInfo ci = tm.getConnectionInfo(1);
@@ -1409,27 +1405,6 @@ public class Connection
}
/**
- * Enable/disable TCP_NODELAY (disable/enable Nagle's algorithm) on the
- * underlying socket.
- * <p>
- * Can be called at any time. If the connection has not yet been established
- * then the passed value will be stored and set after the socket has been
- * set up. The default value that will be used is <code>false</code>.
- *
- * @param enable
- * the argument passed to the <code>Socket.setTCPNoDelay()</code>
- * method.
- * @throws IOException
- */
- public synchronized void setTCPNoDelay(boolean enable) throws IOException
- {
- tcpNoDelay = enable;
-
- if (tm != null)
- tm.setTcpNoDelay(enable);
- }
-
- /**
* Used to tell the library that the connection shall be established through
* a proxy server. It only makes sense to call this method before calling
* the {@link #connect() connect()} method.
diff --git a/sshlib/src/main/java/com/trilead/ssh2/transport/TransportManager.java b/sshlib/src/main/java/com/trilead/ssh2/transport/TransportManager.java
index 8f3406e..b991f3c 100644
--- a/sshlib/src/main/java/com/trilead/ssh2/transport/TransportManager.java
+++ b/sshlib/src/main/java/com/trilead/ssh2/transport/TransportManager.java
@@ -7,7 +7,6 @@ import java.io.OutputStream;
import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.net.Socket;
-import java.net.SocketTimeoutException;
import java.net.UnknownHostException;
import java.security.SecureRandom;
import java.util.Vector;
@@ -156,16 +155,6 @@ public class TransportManager
return tc.getPacketOverheadEstimate();
}
- public void setTcpNoDelay(boolean state) throws IOException
- {
- sock.setTcpNoDelay(state);
- }
-
- public void setSoTimeout(int timeout) throws IOException
- {
- sock.setSoTimeout(timeout);
- }
-
public ConnectionInfo getConnectionInfo(int kexNumber) throws IOException
{
return km.getOrWaitForConnectionInfo(kexNumber);