public static SynAckHeader FromSegment(ArraySegment<byte> segment)
        {
            ushort sequenceNumber = segment.ReadSequenceNumber(SystemHeader.Size);
            ushort ackNumber = segment.ReadSequenceNumber(SystemHeader.Size + 2);

            return new SynAckHeader(sequenceNumber, ackNumber);
        }
        public static ReliableDataHeader FromSegment(ArraySegment<byte> segment)
        {
            ushort sequenceNumber = segment.ReadSequenceNumber(SystemHeader.Size);
            ushort payloadSize = (ushort)BitConverter.ToInt16(segment.Array, segment.Offset + SystemHeader.Size + 2);

            return new ReliableDataHeader(sequenceNumber, payloadSize);
        }
        public static HeartbeatHeader FromSegment(ArraySegment<byte> segment)
        {
            ushort sequenceNumber = segment.ReadSequenceNumber(SystemHeader.Size);

            return new HeartbeatHeader(sequenceNumber);
        }