示例#1
0
 public void RemoveAsyncContext(SMB2AsyncContext context)
 {
     lock (m_pendingRequests)
     {
         m_pendingRequests.Remove(context.AsyncID);
     }
 }
示例#2
0
        public SMB2AsyncContext CreateAsyncContext(FileID fileID, SMB2ConnectionState connection, ulong sessionID, uint treeID)
        {
            ulong?asyncID = AllocateAsyncID();

            if (asyncID == null)
            {
                return(null);
            }
            SMB2AsyncContext context = new SMB2AsyncContext();

            context.AsyncID    = asyncID.Value;
            context.FileID     = fileID;
            context.Connection = connection;
            context.SessionID  = sessionID;
            context.TreeID     = treeID;
            lock (m_pendingRequests)
            {
                m_pendingRequests.Add(asyncID.Value, context);
            }
            return(context);
        }