예제 #1
0
        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 ();
        }
예제 #2
0
        public DirectServer()
        {
            ConnectionServer = new ConnectionServer ("Example.com");

            WebQuery = new QueryServer(Transport.WebService, "obp1.example.com", "10.1.2.3", 443, 1, 100);
            ConnectionServer.AddQueryServer(
                WebQuery.QueryServerConnection, WebQuery.MasterSeed);

            DNSQuery = new QueryServer(Transport.DNS, "dns1.example.com", "10.1.2.2", 53, 1, 100);
            ConnectionServer.AddQueryServer(
                DNSQuery.QueryServerConnection, DNSQuery.MasterSeed);

            UDPQuery = new QueryServer(Transport.UDP, "udp.example.com", "10.1.2.2", 5000, 1, 100);
            ConnectionServer.AddQueryServer(
                UDPQuery.QueryServerConnection, UDPQuery.MasterSeed);

            ConnectionBinding = new DirectConnectionBinding (ConnectionServer);

            WebBinding = new DirectQueryBinding (WebQuery);
            DNSBinding = new DirectQueryBinding (DNSQuery);
            UDPBinding = new DirectQueryBinding (UDPQuery);
        }
예제 #3
0
 public DirectConnectionBinding(ConnectionServer ConnectionServerIn)
 {
     ConnectionServer = ConnectionServerIn;
 }