Example #1
0
        public SynPacket(Interfaces.IPacket packet, IDataPacketExtractor dataPacketExtractor = null)
        {
            Data    = packet.Data;
            Timeout = packet.Timeout;
            if (dataPacketExtractor == null)
            {
                dataPacketExtractor = new DataPacketExtractor();
            }

            DataPacketExtractor = dataPacketExtractor;

            Initialize();
        }
Example #2
0
        public SynPacket(byte[] data, IDataPacketExtractor dataPacketExtractor = null)
        {
            Data = data;
            if (dataPacketExtractor == null)
            {
                dataPacketExtractor = new DataPacketExtractor();
            }

            DataPacketExtractor = dataPacketExtractor;

            Initialize();
            if (IsGuaranteedCommand)
            {
                Timeout = General.GuaranteedCommandTimeout;
            }
        }