Example #1
0
        private static StringSegment ReadProtocol(StringSegment chars)
        {
            var spaceIndex = SipCharacters.IndexOfWhitespace(chars);

            if (spaceIndex == -1)
            {
                return(chars);
            }

            return(chars.Subsegment(0, spaceIndex));
        }
Example #2
0
        private static StringSegment ReadSequenceNumber(StringSegment chars)
        {
            var separatorIndex = SipCharacters.IndexOfWhitespace(chars);

            if (separatorIndex < 0)
            {
                return(chars);
            }

            return(chars.Subsegment(0, separatorIndex));
        }