public override void Server(Server Options) { Console.WriteLine ("Launch the server using configuration file {0}", Options.Configuration); OmniBroker.Config Config = new OmniBroker.Config (Options.Configuration.Value); Connect Connect = Config.GetConnect (Options.Handle.Text); // Here we need to change Connection Server to pass in the // Connection server description. ConnectionServer ConnectionServer = new ConnectionServer (Connect); WebServiceServer WebService = new WebServiceServer (); // Connect.Domain WebService.RegisterService ("*", Connect.Port.Data, null, ConnectionServer); WebService.Listener (); }
// Call RegisterService to register for each port, etc. public void RegisterService(string domain, int port, string Location, Server Server ) { if (Location == null) { Location = ""; } ServiceInstance Instance = new ServiceInstance(); Instance.Prefix = "http://" + domain + ":" + port.ToString() + "/" + Location; Instance.Server = Server; Instances.Add(Instance); }