mirror of
https://github.com/TalAloni/SMBLibrary.git
synced 2025-08-14 11:13:47 +02:00
ISMBClient: Added MaxReadSize and MaxWriteSize properties
This commit is contained in:
parent
78aa93276a
commit
8a7d144483
2 changed files with 31 additions and 0 deletions
|
@ -25,5 +25,15 @@ namespace SMBLibrary.Client
|
||||||
List<string> ListShares(out NTStatus status);
|
List<string> ListShares(out NTStatus status);
|
||||||
|
|
||||||
ISMBFileStore TreeConnect(string shareName, out NTStatus status);
|
ISMBFileStore TreeConnect(string shareName, out NTStatus status);
|
||||||
|
|
||||||
|
uint MaxReadSize
|
||||||
|
{
|
||||||
|
get;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint MaxWriteSize
|
||||||
|
{
|
||||||
|
get;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -567,6 +567,27 @@ namespace SMBLibrary.Client
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public uint MaxReadSize
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return ClientMaxBufferSize - (SMB1Header.Length + 3 + ReadAndXResponse.ParametersLength);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public uint MaxWriteSize
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
uint result = ServerMaxBufferSize - (SMB1Header.Length + 3 + WriteAndXRequest.ParametersFixedLength + 4);
|
||||||
|
if (m_unicode)
|
||||||
|
{
|
||||||
|
result--;
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static void TrySendMessage(Socket socket, SMB1Message message)
|
public static void TrySendMessage(Socket socket, SMB1Message message)
|
||||||
{
|
{
|
||||||
SessionMessagePacket packet = new SessionMessagePacket();
|
SessionMessagePacket packet = new SessionMessagePacket();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue