C# Class SipSharp.Messages.MessageFactory

Parses and builds messages

The message factory takes care of building messages from all end points.

Since both message and packet protocols are used, the factory hands out contexts to all end points. The context keeps a state to be able to parse partial messages properly.

Each end point need to hand the context back to the message factory when the client disconnects (or a message have been parsed).

显示文件 Open project: jgauffin/SipSharp Class Usage Examples

Public Methods

Method Description
MessageFactory ( HeaderFactory factory ) : System

Private Methods

Method Description
CreateBuilder ( ) : MessageFactoryContext
CreateNewContext ( EndPoint ep ) : MessageFactoryContext

Create a new message factory context.

A context is used to parse messages from a specific endpoint.

CreateRequest ( string method, string path, string version ) : Request
CreateResponse ( string version, StatusCode statusCode, string reason ) : Response
OnRequest ( object sender, RequestEventArgs e ) : void
OnResponse ( object sender, ResponseEventArgs e ) : void
Release ( MessageFactoryContext factoryContext ) : void

Release a used factoryContext.

Method Details

MessageFactory() public method

public MessageFactory ( HeaderFactory factory ) : System
factory SipSharp.Messages.Headers.HeaderFactory
return System