|
@@ -24,6 +24,7 @@ namespace SMBLibrary.Server
|
|
|
private BlockingQueue<SessionPacket> m_sendQueue;
|
|
|
private DateTime m_creationDT;
|
|
|
private DateTime m_lastReceiveDT;
|
|
|
+ private Reference<DateTime> m_lastSendDTRef; // We must use a reference because the sender thread will keep using the original ConnectionState object
|
|
|
private LogDelegate LogToServerHandler;
|
|
|
public SMBDialect Dialect;
|
|
|
public GSSContext AuthenticationContext;
|
|
@@ -36,6 +37,7 @@ namespace SMBLibrary.Server
|
|
|
m_sendQueue = new BlockingQueue<SessionPacket>();
|
|
|
m_creationDT = DateTime.UtcNow;
|
|
|
m_lastReceiveDT = DateTime.UtcNow;
|
|
|
+ m_lastSendDTRef = DateTime.UtcNow;
|
|
|
LogToServerHandler = logToServerHandler;
|
|
|
Dialect = SMBDialect.NotSet;
|
|
|
}
|
|
@@ -48,6 +50,7 @@ namespace SMBLibrary.Server
|
|
|
m_sendQueue = state.SendQueue;
|
|
|
m_creationDT = state.CreationDT;
|
|
|
m_lastReceiveDT = state.LastReceiveDT;
|
|
|
+ m_lastSendDTRef = state.LastSendDTRef;
|
|
|
LogToServerHandler = state.LogToServerHandler;
|
|
|
Dialect = state.Dialect;
|
|
|
}
|
|
@@ -126,11 +129,32 @@ namespace SMBLibrary.Server
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ public DateTime LastSendDT
|
|
|
+ {
|
|
|
+ get
|
|
|
+ {
|
|
|
+ return LastSendDTRef.Value;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ internal Reference<DateTime> LastSendDTRef
|
|
|
+ {
|
|
|
+ get
|
|
|
+ {
|
|
|
+ return m_lastSendDTRef;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
public void UpdateLastReceiveDT()
|
|
|
{
|
|
|
m_lastReceiveDT = DateTime.UtcNow;
|
|
|
}
|
|
|
|
|
|
+ public void UpdateLastSendDT()
|
|
|
+ {
|
|
|
+ m_lastSendDTRef.Value = DateTime.UtcNow;
|
|
|
+ }
|
|
|
+
|
|
|
public string ConnectionIdentifier
|
|
|
{
|
|
|
get
|