AddDefaultParsers() public method

Add all default parsers in the library.
public AddDefaultParsers ( ) : void
return void
        public MessageFactoryTest()
        {
            LogFactory.Assign(new ConsoleLogFactory(null));

            _headerFactory = new HeaderFactory();
            _headerFactory.AddDefaultParsers();
            _factory = new MessageFactory(_headerFactory);
            _factory.RequestReceived += OnRequest;
            _factory.ResponseReceived += OnResponse;
        }
Beispiel #2
0
        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;
        }
Beispiel #3
0
 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();
 }