Browse Source

add nodelay

tags/2.3
clowwindy 10 years ago
parent
commit
8d9375ac11
2 changed files with 2 additions and 1 deletions
  1. +2
    -0
      shadowsocks-csharp/Controller/Local.cs
  2. +0
    -1
      shadowsocks-csharp/Controller/UpdateChecker.cs

+ 2
- 0
shadowsocks-csharp/Controller/Local.cs View File

@@ -70,6 +70,7 @@ namespace Shadowsocks.Controller
{ {
Socket listener = (Socket)ar.AsyncState; Socket listener = (Socket)ar.AsyncState;
Socket conn = listener.EndAccept(ar); Socket conn = listener.EndAccept(ar);
conn.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.NoDelay, true);
listener.BeginAccept( listener.BeginAccept(
new AsyncCallback(AcceptCallback), new AsyncCallback(AcceptCallback),
@@ -130,6 +131,7 @@ namespace Shadowsocks.Controller
remote = new Socket(ipAddress.AddressFamily, remote = new Socket(ipAddress.AddressFamily,
SocketType.Stream, ProtocolType.Tcp); SocketType.Stream, ProtocolType.Tcp);
remote.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.NoDelay, true);
// Connect to the remote endpoint. // Connect to the remote endpoint.
remote.BeginConnect(remoteEP, remote.BeginConnect(remoteEP,


+ 0
- 1
shadowsocks-csharp/Controller/UpdateChecker.cs View File

@@ -121,7 +121,6 @@ namespace Shadowsocks.Controller
{ {
if (attr.Name == "url") if (attr.Name == "url")
{ {
Console.WriteLine(attr.Value);
if (IsNewVersion(attr.Value)) if (IsNewVersion(attr.Value))
{ {
versions.Add(attr.Value); versions.Add(attr.Value);


Loading…
Cancel
Save