/** * Constructor for WebService * @param prefix string where the server should listen. Example "http://localhost:8080/" */ public WebService(string prefix, Encoder encoder, Streaming streaming) { log.Debug("Creating Web Service"); this.dvrbConfig = null; this.uriPrefixes = new string[] { prefix }; this.encoder = encoder; this.streaming = streaming; // Create a listener. this.listener = new HttpListener(); }
// Service start protected override void OnStart(string[] args) { log.Trace("-------------------------------"); log.Trace("DVRB STARTING APPLICATION..."); log.Trace("-------------------------------"); this.policyServer = new FlashPolicyServer(); this.encoder = new Encoder(); this.stream = new Streaming(); this.webService = new WebService("http://+:8080/", this.encoder, this.stream); this.policyServer.Start(); this.webService.StartWebServiceListener(); }