public MessageFactoryContext(MessageFactory msgFactory, HeaderFactory factory, SipParser parser) { _msgFactory = msgFactory; _factory = factory; _parser = parser; parser.HeaderParsed += OnHeader; parser.MessageComplete += OnMessageComplete; parser.RequestLineParsed += OnRequestLine; parser.ResponseLineParsed += OnResponseLine; }
public MessageFactoryTest() { LogFactory.Assign(new ConsoleLogFactory(null)); _headerFactory = new HeaderFactory(); _headerFactory.AddDefaultParsers(); _factory = new MessageFactory(_headerFactory); _factory.RequestReceived += OnRequest; _factory.ResponseReceived += OnResponse; }
public TcpTransportTest() { LogFactory.Assign(new ConsoleLogFactory(null)); var headerFactory = new HeaderFactory(); headerFactory.AddDefaultParsers(); _messageFactory = new MessageFactory(headerFactory); _messageFactory.RequestReceived += OnRequest; _messageFactory.ResponseReceived += OnResponse; var pool = new ObjectPool<byte[]>(CreateBuffer); _transport = new TcpTransport(new IPEndPoint(IPAddress.Any, 1324), _messageFactory) {BufferPool = _bufferPool}; _transport.Start(); _transport.UnhandledException += OnUnhandledException; }
public MessageFactory(HeaderFactory factory) { _factory = factory; _builders = new ObjectPool<MessageFactoryContext>(CreateBuilder); }
public SipStack() { var hf = new HeaderFactory(); hf.AddDefaultParsers(); _messageFactory = new MessageFactory(hf); _transportLayer = new TransportLayer(MessageFactory); _transportLayer.RequestReceived += OnRequest; _transportLayer.ResponseReceived += OnResponse; _transactionManager = new TransactionManager(_transportLayer); _dialogManager = new DialogManager(this); _authenticator = new Authenticator(); }