移除超时时间,会导致需要耗时操作无法等到结果

This commit is contained in:
ioxygen 2021-07-02 11:10:57 +08:00
parent f67d86f021
commit 3ef13d7727

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()