WriteWireFormat() private method

private WriteWireFormat ( byte dst, int dstIndex ) : int
dst byte
dstIndex int
return int
コード例 #1
0
ファイル: NameServicePacket.cs プロジェクト: zxz2020/Emby
        internal virtual int WriteResourceRecordWireFormat(byte[] dst, int dstIndex)
        {
            int start = dstIndex;

            if (RecordName == QuestionName)
            {
                dst[dstIndex++] = unchecked (unchecked (0xC0));
                // label string pointer to
                dst[dstIndex++] = unchecked (unchecked (0x0C));
            }
            else
            {
                // questionName (offset 12)
                dstIndex += RecordName.WriteWireFormat(dst, dstIndex);
            }
            WriteInt2(RecordType, dst, dstIndex);
            dstIndex += 2;
            WriteInt2(RecordClass, dst, dstIndex);
            dstIndex += 2;
            WriteInt4(Ttl, dst, dstIndex);
            dstIndex   += 4;
            RDataLength = WriteRDataWireFormat(dst, dstIndex + 2);
            WriteInt2(RDataLength, dst, dstIndex);
            dstIndex += 2 + RDataLength;
            return(dstIndex - start);
        }
コード例 #2
0
ファイル: SessionRequestPacket.cs プロジェクト: zxz2020/Emby
        internal override int WriteTrailerWireFormat(byte[] dst, int dstIndex)
        {
            int start = dstIndex;

            dstIndex += _calledName.WriteWireFormat(dst, dstIndex);
            dstIndex += _callingName.WriteWireFormat(dst, dstIndex);
            return(dstIndex - start);
        }
コード例 #3
0
ファイル: NameServicePacket.cs プロジェクト: zxz2020/Emby
        internal virtual int WriteQuestionSectionWireFormat(byte[] dst, int dstIndex)
        {
            int start = dstIndex;

            dstIndex += QuestionName.WriteWireFormat(dst, dstIndex);
            WriteInt2(QuestionType, dst, dstIndex);
            dstIndex += 2;
            WriteInt2(QuestionClass, dst, dstIndex);
            dstIndex += 2;
            return(dstIndex - start);
        }