public PylonRestSvc() { this.httpSvc = new HttpSvc(); this.router = new Router(); this.router.assemble(); }
public void start(Router router,int port = 80 ) { this.router = router; isSvcing = true; listener = new TcpListener(IPAddress.Any, port); listener.Start(); logger.InfoFormat("Pylon HttpSvc started! port[{0:d}]", port); listener.BeginAcceptTcpClient(new AsyncCallback(AcceptCallback), listener); }