mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-22 12:02:05 +01:00
proxy: do not call setTcpNoDelay() but instead flush the stream
This commit is contained in:
parent
be2fc23f41
commit
b6ad737aa4
2 changed files with 3 additions and 3 deletions
|
@ -46,7 +46,6 @@ public class Socks4ProxySocketConnection implements ProxySocketConnection {
|
|||
socket.connect(new InetSocketAddress(proxy_host, proxy_port), timeout);
|
||||
InputStream in = socket.getInputStream();
|
||||
OutputStream out = socket.getOutputStream();
|
||||
socket.setTcpNoDelay(true);
|
||||
|
||||
byte[] buf = new byte[1024];
|
||||
int index = 0;
|
||||
|
@ -88,6 +87,7 @@ public class Socks4ProxySocketConnection implements ProxySocketConnection {
|
|||
}
|
||||
buf[index++] = 0;
|
||||
out.write(buf, 0, index);
|
||||
out.flush();
|
||||
|
||||
/*
|
||||
The SOCKS server checks to see whether such a request should be granted
|
||||
|
|
|
@ -48,8 +48,6 @@ public class Socks5ProxySocketConnection implements ProxySocketConnection {
|
|||
InputStream in = socket.getInputStream();
|
||||
OutputStream out = socket.getOutputStream();
|
||||
|
||||
socket.setTcpNoDelay(true);
|
||||
|
||||
byte[] buf = new byte[1024];
|
||||
int index = 0;
|
||||
|
||||
|
@ -81,6 +79,7 @@ public class Socks5ProxySocketConnection implements ProxySocketConnection {
|
|||
buf[index++] = 2; // USERNAME/PASSWORD
|
||||
|
||||
out.write(buf, 0, index);
|
||||
out.flush();
|
||||
|
||||
/*
|
||||
The server selects from one of the methods given in METHODS, and
|
||||
|
@ -205,6 +204,7 @@ public class Socks5ProxySocketConnection implements ProxySocketConnection {
|
|||
buf[index++] = (byte) (port & 0xff);
|
||||
|
||||
out.write(buf, 0, index);
|
||||
out.flush();
|
||||
|
||||
/*
|
||||
The SOCKS request information is sent by the client as soon as it has
|
||||
|
|
Loading…
Reference in a new issue