Tunneling performance patch from Ingo Molnar

git-svn-id: https://proxytunnel.svn.sourceforge.net/svnroot/proxytunnel/trunk/proxytunnel@166 bc163920-b10d-0410-b2c5-a5491ca2ceef
This commit is contained in:
Mark Janssen 2007-12-30 14:27:03 +00:00
parent f9f7891cc5
commit 76f3802a1f

View file

@ -24,6 +24,8 @@
#include <unistd.h>
#include <string.h>
#include <sys/types.h>
#include <netinet/tcp.h>
#include <netinet/in.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
@ -124,6 +126,12 @@ int tunnel_connect() {
args_info.proxyport_arg );
}
{ /* Increase interactivity of tunnel, patch by Ingo Molnar */
int flag = 1;
setsockopt( sd, IPPROTO_TCP, TCP_NODELAY,
(char *)&flag, sizeof(int));
}
/* Make sure we get warned when someone hangs up on us */
signal(SIGHUP,signal_handler);