public SynPacket(Interfaces.IPacket packet, IDataPacketExtractor dataPacketExtractor = null) { Data = packet.Data; Timeout = packet.Timeout; if (dataPacketExtractor == null) { dataPacketExtractor = new DataPacketExtractor(); } DataPacketExtractor = dataPacketExtractor; Initialize(); }
public SynPacket(byte[] data, IDataPacketExtractor dataPacketExtractor = null) { Data = data; if (dataPacketExtractor == null) { dataPacketExtractor = new DataPacketExtractor(); } DataPacketExtractor = dataPacketExtractor; Initialize(); if (IsGuaranteedCommand) { Timeout = General.GuaranteedCommandTimeout; } }