Exemplo n.º 1
0
        private static void Parse(string data)
        {
            var parser = HttpParser.Create();

            parser.Initialize(HttpParserType.Request);

            parser.OnHeaderField     = printData("on header field");
            parser.OnHeaderValue     = printData("on header value");
            parser.OnUrl             = printData("on url");
            parser.OnBody            = printData("on body");
            parser.OnHeadersComplete = print("headers complete");
            parser.OnMessageBegin    = print("message begin");
            parser.OnMessageComplete = print("message complete");

            parser.Execute(data);
        }