Merge pull request #23 from FastTunnel/ioxygen

移除超时时间,会导致需要耗时操作无法等到结果
This commit is contained in:
ioxygen 2021-07-02 11:16:53 +08:00 committed by GitHub
commit c8eaa01537
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15,22 +15,12 @@ namespace FastTunnel.Core
public Socket Socket { get; set; }
public Connecter(string v1, int v2, int? sendTimeout = null)
public Connecter(string v1, int v2)
{
this._host = v1;
this._port = v2;
Socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
if (sendTimeout.HasValue)
{
Socket.ReceiveTimeout = sendTimeout.Value;
Socket.SendTimeout = sendTimeout.Value;
}
else
{
Socket.SendTimeout = 2000;
}
}
public void Connect()