mirror of
https://github.com/TalAloni/SMBLibrary.git
synced 2025-07-26 02:38:15 +02:00
Client: Minor code refactoring
This commit is contained in:
parent
b4652935c6
commit
4b06f74d6e
2 changed files with 9 additions and 8 deletions
|
@ -20,12 +20,13 @@ namespace SMBLibrary.Client
|
|||
{
|
||||
public class SMB1Client : ISMBClient
|
||||
{
|
||||
public const int NetBiosOverTCPPort = 139;
|
||||
public const int DirectTCPPort = 445;
|
||||
public const string NTLanManagerDialect = "NT LM 0.12";
|
||||
private const string NTLanManagerDialect = "NT LM 0.12";
|
||||
|
||||
public const ushort ClientMaxBufferSize = 65535; // Valid range: 512 - 65535
|
||||
public const ushort ClientMaxMpxCount = 1;
|
||||
public static readonly int NetBiosOverTCPPort = 139;
|
||||
public static readonly int DirectTCPPort = 445;
|
||||
|
||||
private static readonly ushort ClientMaxBufferSize = 65535; // Valid range: 512 - 65535
|
||||
private static readonly ushort ClientMaxMpxCount = 1;
|
||||
|
||||
private SMBTransportType m_transport;
|
||||
private bool m_isConnected;
|
||||
|
@ -649,7 +650,7 @@ namespace SMBLibrary.Client
|
|||
{
|
||||
get
|
||||
{
|
||||
return ClientMaxBufferSize - (SMB1Header.Length + 3 + ReadAndXResponse.ParametersLength);
|
||||
return (uint)ClientMaxBufferSize - (SMB1Header.Length + 3 + ReadAndXResponse.ParametersLength);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -21,8 +21,8 @@ namespace SMBLibrary.Client
|
|||
{
|
||||
public class SMB2Client : ISMBClient
|
||||
{
|
||||
public const int NetBiosOverTCPPort = 139;
|
||||
public const int DirectTCPPort = 445;
|
||||
public static readonly int NetBiosOverTCPPort = 139;
|
||||
public static readonly int DirectTCPPort = 445;
|
||||
|
||||
public static readonly uint ClientMaxTransactSize = 8388608;
|
||||
public static readonly uint ClientMaxReadSize = 8388608;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue