|
@@ -42,7 +42,10 @@ namespace Shadowsocks.Util.Sockets |
|
|
arg.Completed += OnTcpConnectCompleted; |
|
|
arg.Completed += OnTcpConnectCompleted; |
|
|
arg.UserToken = new TcpUserToken(callback, state); |
|
|
arg.UserToken = new TcpUserToken(callback, state); |
|
|
|
|
|
|
|
|
Socket.ConnectAsync(SocketType.Stream, ProtocolType.Tcp, arg); |
|
|
|
|
|
|
|
|
if(!Socket.ConnectAsync(SocketType.Stream, ProtocolType.Tcp, arg))
|
|
|
|
|
|
{
|
|
|
|
|
|
OnTcpConnectCompleted(this, arg);
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private class FakeAsyncResult : IAsyncResult |
|
|
private class FakeAsyncResult : IAsyncResult |
|
|