public Command23(CommandBuilder command) { if (command == null) { throw new ArgumentNullException("command"); } m_Command = command; m_CommandID = m_Command.ReadBytes(48); m_SenderPeerID = m_Command.ReadBytes(48); m_ReceiverPeerID = m_Command.ReadBytes(48); m_SearchID = m_Command.ReadBytes(48); m_SearchResults = new RList <SearchResult>(); ushort searchResultsCount = m_Command.ReadUInt16(); for (int n = 0; n < searchResultsCount; n++) { byte[] fileHash = m_Command.ReadBytes(64); uint fileSize = m_Command.ReadUInt32(); string fileName = m_Command.ReadString(); RIndexedHashtable <string, string> metaData = new RIndexedHashtable <string, string>(); ushort metaDataCount = m_Command.ReadUInt16(); for (int m = 0; m < metaDataCount; m++) { metaData.Add(m_Command.ReadString(), m_Command.ReadString()); } m_SearchResults.Add(new SearchResult(fileHash, fileSize, fileName, metaData, m_Command.ReadString(), m_Command.ReadByte())); } }
public Command54(CommandBuilder command) { if (command == null) { throw new ArgumentNullException("command"); } m_Command = command; m_CommandID = m_Command.ReadBytes(48); m_SenderPeerID = m_Command.ReadBytes(48); m_ReceiverPeerID = m_Command.ReadBytes(48); m_SourceSearchID = m_Command.ReadBytes(48); m_FileSize = m_Command.ReadUInt32(); m_FileName = m_Command.ReadString(); m_MetaData = new RIndexedHashtable <string, string>(); ushort metaDataCount = m_Command.ReadUInt16(); for (int n = 0; n < metaDataCount; n++) { m_MetaData.Add(m_Command.ReadString(), m_Command.ReadString()); } m_Comment = m_Command.ReadString(); m_Rating = m_Command.ReadByte(); m_SectorsMap = m_Command.ReadBytes(m_Command.ReadUInt16()); }
public Command10(CommandBuilder command) { if (command == null) throw new ArgumentNullException("command"); m_Command = command; m_Keys.Modulus = m_Command.ReadBytes(command.ReadUInt16()); m_Keys.Exponent = m_Command.ReadBytes(command.ReadUInt16()); }
public Command11(CommandBuilder command) { if (command == null) { throw new ArgumentNullException("command"); } m_Command = command; m_Keys.Modulus = m_Command.ReadBytes(command.ReadUInt16()); m_Keys.Exponent = m_Command.ReadBytes(command.ReadUInt16()); }
public Command21(CommandBuilder command) { if (command == null) throw new ArgumentNullException("command"); m_Command = command; m_CommandID = m_Command.ReadBytes(48); m_Reserved = m_Command.ReadUInt16(); m_HopCount = m_Command.ReadUInt16(); m_SenderPeerID = m_Command.ReadBytes(48); m_SearchID = m_Command.ReadBytes(48); m_SearchPattern = m_Command.ReadString(); }
public Command61(CommandBuilder command) { if (command == null) throw new ArgumentNullException("command"); m_Command = command; m_CommandID = m_Command.ReadBytes(48); m_Reserved = m_Command.ReadUInt16(); m_HopCount = m_Command.ReadUInt16(); m_SenderPeerID = m_Command.ReadBytes(48); m_SourceSearchID = m_Command.ReadBytes(48); m_HashedFileHash = m_Command.ReadBytes(64); }
public Command12(CommandBuilder command) { if (command == null) throw new ArgumentNullException("command"); m_Command = command; m_Keys.BlockSize = m_Command.ReadUInt16(); m_Keys.FeedbackSize = m_Command.ReadUInt16(); m_Keys.KeySize = m_Command.ReadUInt16(); m_Keys.Mode = (CipherMode)m_Command.ReadByte(); m_Keys.Padding = (PaddingMode)m_Command.ReadByte(); m_Keys.IV = m_Command.ReadBytes(m_Command.ReadByte()); m_Keys.Key = m_Command.ReadBytes(m_Command.ReadByte()); }
public Command61(CommandBuilder command) { if (command == null) { throw new ArgumentNullException("command"); } m_Command = command; m_CommandID = m_Command.ReadBytes(48); m_Reserved = m_Command.ReadUInt16(); m_HopCount = m_Command.ReadUInt16(); m_SenderPeerID = m_Command.ReadBytes(48); m_SourceSearchID = m_Command.ReadBytes(48); m_HashedFileHash = m_Command.ReadBytes(64); }
public Command21(CommandBuilder command) { if (command == null) { throw new ArgumentNullException("command"); } m_Command = command; m_CommandID = m_Command.ReadBytes(48); m_Reserved = m_Command.ReadUInt16(); m_HopCount = m_Command.ReadUInt16(); m_SenderPeerID = m_Command.ReadBytes(48); m_SearchID = m_Command.ReadBytes(48); m_SearchPattern = m_Command.ReadString(); }
public Command12(CommandBuilder command) { if (command == null) { throw new ArgumentNullException("command"); } m_Command = command; m_Keys.BlockSize = m_Command.ReadUInt16(); m_Keys.FeedbackSize = m_Command.ReadUInt16(); m_Keys.KeySize = m_Command.ReadUInt16(); m_Keys.Mode = (CipherMode)m_Command.ReadByte(); m_Keys.Padding = (PaddingMode)m_Command.ReadByte(); m_Keys.IV = m_Command.ReadBytes(m_Command.ReadByte()); m_Keys.Key = m_Command.ReadBytes(m_Command.ReadByte()); }
public Command54(CommandBuilder command) { if (command == null) throw new ArgumentNullException("command"); m_Command = command; m_CommandID = m_Command.ReadBytes(48); m_SenderPeerID = m_Command.ReadBytes(48); m_ReceiverPeerID = m_Command.ReadBytes(48); m_SourceSearchID = m_Command.ReadBytes(48); m_FileSize = m_Command.ReadUInt32(); m_FileName = m_Command.ReadString(); m_MetaData = new RIndexedHashtable<string, string>(); ushort metaDataCount = m_Command.ReadUInt16(); for (int n = 0; n < metaDataCount; n++) m_MetaData.Add(m_Command.ReadString(), m_Command.ReadString()); m_Comment = m_Command.ReadString(); m_Rating = m_Command.ReadByte(); m_SectorsMap = m_Command.ReadBytes(m_Command.ReadUInt16()); }
public Command64(CommandBuilder command) { if (command == null) throw new ArgumentNullException("command"); m_Command = command; m_CommandID = m_Command.ReadBytes(48); m_SenderPeerID = m_Command.ReadBytes(48); m_ReceiverPeerID = m_Command.ReadBytes(48); m_SourceSearchID = m_Command.ReadBytes(48); m_SectorsMap = m_Command.ReadBytes(m_Command.ReadUInt16()); }
public Command79(CommandBuilder command) { if (command == null) throw new ArgumentNullException("command"); m_Command = command; m_CommandID = m_Command.ReadBytes(48); m_SenderPeerID = m_Command.ReadBytes(48); m_ReceiverPeerID = m_Command.ReadBytes(48); m_DownloadID = m_Command.ReadBytes(48); m_Sector = m_Command.ReadUInt32(); m_SectorData = m_Command.ReadBytes(m_Command.ReadUInt16()); m_SectorHashCodeResult = m_Command.ReadBytes(64); }
public Command64(CommandBuilder command) { if (command == null) { throw new ArgumentNullException("command"); } m_Command = command; m_CommandID = m_Command.ReadBytes(48); m_SenderPeerID = m_Command.ReadBytes(48); m_ReceiverPeerID = m_Command.ReadBytes(48); m_SourceSearchID = m_Command.ReadBytes(48); m_SectorsMap = m_Command.ReadBytes(m_Command.ReadUInt16()); }
public Command23(CommandBuilder command) { if (command == null) throw new ArgumentNullException("command"); m_Command = command; m_CommandID = m_Command.ReadBytes(48); m_SenderPeerID = m_Command.ReadBytes(48); m_ReceiverPeerID = m_Command.ReadBytes(48); m_SearchID = m_Command.ReadBytes(48); m_SearchResults = new RList<SearchResult>(); ushort searchResultsCount = m_Command.ReadUInt16(); for (int n = 0; n < searchResultsCount; n++) { byte[] fileHash = m_Command.ReadBytes(64); uint fileSize = m_Command.ReadUInt32(); string fileName = m_Command.ReadString(); RIndexedHashtable<string, string> metaData = new RIndexedHashtable<string, string>(); ushort metaDataCount = m_Command.ReadUInt16(); for (int m = 0; m < metaDataCount; m++) metaData.Add(m_Command.ReadString(), m_Command.ReadString()); m_SearchResults.Add(new SearchResult(fileHash, fileSize, fileName, metaData, m_Command.ReadString(), m_Command.ReadByte())); } }
public Command79(CommandBuilder command) { if (command == null) { throw new ArgumentNullException("command"); } m_Command = command; m_CommandID = m_Command.ReadBytes(48); m_SenderPeerID = m_Command.ReadBytes(48); m_ReceiverPeerID = m_Command.ReadBytes(48); m_DownloadID = m_Command.ReadBytes(48); m_Sector = m_Command.ReadUInt32(); m_SectorData = m_Command.ReadBytes(m_Command.ReadUInt16()); m_SectorHashCodeResult = m_Command.ReadBytes(64); }