C# 클래스 SipSharp.Messages.SipParser

파일 보기 프로젝트 열기: jgauffin/SipSharp 1 사용 예제들

공개 메소드들

메소드 설명
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