C# Класс SipSharp.Messages.SipParser

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
Parse ( byte buffer, int offset, int count ) : int

Continue parsing a message

ParseFirstLine ( ) : bool
Reset ( ) : void
SipParser ( ) : System

Initializes a new instance of the SipParser class.

Защищенные методы

Метод Описание
OnBodyBytes ( byte bytes, int offset, int count ) : void

Toggle body bytes event.

OnComplete ( ) : void

Raise the MessageComplete event, since we have successfully parsed a message and it's body.

OnFirstLine ( string words ) : void

First message line.

Used to raise the RequestLineParsed or ResponseLineParsed event depending on the words in the array.

Приватные методы

Метод Описание
GetBody ( ) : bool

Parser method to copy all body bytes.

Needed since a TCP packet can contain multiple messages after each other, or partial messages.

GetHeaderName ( ) : bool

Try to find a header name.

GetHeaderValue ( ) : bool

Get header values.

Will also look for multi header values and automatically merge them to one line.

OnHeader ( string name, string value ) : void

Описание методов

OnBodyBytes() защищенный Метод

Toggle body bytes event.
protected OnBodyBytes ( byte bytes, int offset, int count ) : void
bytes byte
offset int
count int
Результат void

OnComplete() защищенный Метод

Raise the MessageComplete event, since we have successfully parsed a message and it's body.
protected OnComplete ( ) : void
Результат void

OnFirstLine() защищенный Метод

First message line.
Used to raise the RequestLineParsed or ResponseLineParsed event depending on the words in the array.
BadRequestException.
protected OnFirstLine ( string words ) : void
words string Will always contain three elements.
Результат void

Parse() публичный Метод

Continue parsing a message
Parsing failed.
public Parse ( byte buffer, int offset, int count ) : int
buffer byte Byte buffer containing bytes
offset int Where to start the parsing
count int Number of bytes to parse
Результат int

ParseFirstLine() публичный Метод

public ParseFirstLine ( ) : bool
Результат bool

Reset() публичный Метод

public Reset ( ) : void
Результат void

SipParser() публичный Метод

Initializes a new instance of the SipParser class.
public SipParser ( ) : System
Результат System