Skip to content

Commit

Permalink
SMB1Client: Add ability to control response timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
TalAloni committed Jan 6, 2024
1 parent 64aca73 commit 8b11c57
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion SMBLibrary/Client/SMB1Client.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,14 @@ public bool Connect(IPAddress serverAddress, SMBTransportType transport)
}

public bool Connect(IPAddress serverAddress, SMBTransportType transport, bool forceExtendedSecurity)
{
return Connect(serverAddress, transport, forceExtendedSecurity, DefaultResponseTimeoutInMilliseconds);
}

public bool Connect(IPAddress serverAddress, SMBTransportType transport, bool forceExtendedSecurity, int responseTimeoutInMilliseconds)
{
int port = (transport == SMBTransportType.DirectTCPTransport ? DirectTCPPort : NetBiosOverTCPPort);
return Connect(serverAddress, transport, port, forceExtendedSecurity, DefaultResponseTimeoutInMilliseconds);
return Connect(serverAddress, transport, port, forceExtendedSecurity, responseTimeoutInMilliseconds);
}

internal bool Connect(IPAddress serverAddress, SMBTransportType transport, int port, bool forceExtendedSecurity, int responseTimeoutInMilliseconds)
Expand Down

0 comments on commit 8b11c57

Please sign in to comment.