From 8d9375ac110a5c7d6d8f8b4f811ee9d184d7a2a0 Mon Sep 17 00:00:00 2001 From: clowwindy Date: Mon, 10 Nov 2014 00:42:23 +0800 Subject: [PATCH] add nodelay --- shadowsocks-csharp/Controller/Local.cs | 2 ++ shadowsocks-csharp/Controller/UpdateChecker.cs | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/shadowsocks-csharp/Controller/Local.cs b/shadowsocks-csharp/Controller/Local.cs index 8eb2384b..4df401ce 100755 --- a/shadowsocks-csharp/Controller/Local.cs +++ b/shadowsocks-csharp/Controller/Local.cs @@ -70,6 +70,7 @@ namespace Shadowsocks.Controller { Socket listener = (Socket)ar.AsyncState; Socket conn = listener.EndAccept(ar); + conn.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.NoDelay, true); listener.BeginAccept( new AsyncCallback(AcceptCallback), @@ -130,6 +131,7 @@ namespace Shadowsocks.Controller remote = new Socket(ipAddress.AddressFamily, SocketType.Stream, ProtocolType.Tcp); + remote.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.NoDelay, true); // Connect to the remote endpoint. remote.BeginConnect(remoteEP, diff --git a/shadowsocks-csharp/Controller/UpdateChecker.cs b/shadowsocks-csharp/Controller/UpdateChecker.cs index b731013d..046ae941 100755 --- a/shadowsocks-csharp/Controller/UpdateChecker.cs +++ b/shadowsocks-csharp/Controller/UpdateChecker.cs @@ -121,7 +121,6 @@ namespace Shadowsocks.Controller { if (attr.Name == "url") { - Console.WriteLine(attr.Value); if (IsNewVersion(attr.Value)) { versions.Add(attr.Value);