mirror of
https://github.com/proxytunnel/proxytunnel.git
synced 2026-01-23 02:34:59 +00:00
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:
parent
f9f7891cc5
commit
76f3802a1f
1 changed files with 8 additions and 0 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue