static void Main(string[] args)
        {
            DomainLookUp  domainLookUp  = new DomainLookUp();
            ContextBuffer contextBuffer = new ContextBuffer();
            Listener      listener      = new Listener(contextBuffer, domainLookUp);
            Dispatcher    dispatcher    = new Dispatcher(contextBuffer, domainLookUp);
            WebApp        gfg           = new WebApp(new GfgFileSystem());

            listener.AddDomain("http://localhost:8888/", gfg);
            WebApp oogle = new WebApp(new OogleFileSystem());

            listener.AddDomain("http://localhost:3333/", oogle);
            listener.Listen();
            dispatcher.DispatchRequests();
        }
예제 #2
0
 public Listener(ContextBuffer contextBuffer, DomainLookUp domainLookUp)
 {
     this.contextBuffer = contextBuffer;
     this.domainLookUp  = domainLookUp;
 }
 public Dispatcher(ContextBuffer contextBuffer, DomainLookUp domainLookUp)
 {
     this.contextBuffer = contextBuffer;
     this.domainLookUp  = domainLookUp;
 }