Esempio n. 1
0
        public void Initialise(IConfigSource config)
        {
            int port = 0;

            IConfig estateConfig = config.Configs["Estate"];
            if (estateConfig != null)
            {
                port = estateConfig.GetInt("Port", 0);
            }

            m_EstateConnector = new EstateConnector(this);

            // Instantiate the request handler
            IHttpServer server = MainServer.GetHttpServer((uint)port);
            server.AddStreamHandler(new EstateRequestHandler(this));
        }
        public void Initialise(IConfigSource config)
        {
            int port = 0;

            IConfig estateConfig = config.Configs["Estate"];

            if (estateConfig != null)
            {
                port = estateConfig.GetInt("Port", 0);
            }

            m_EstateConnector = new EstateConnector(this);

            // Instantiate the request handler
            IHttpServer server = MainServer.GetHttpServer((uint)port);

            server.AddStreamHandler(new EstateRequestHandler(this));
        }
Esempio n. 3
0
        public void Initialise(IConfigSource config)
        {
            uint port = MainServer.Instance.Port;

            IConfig estateConfig = config.Configs["Estates"];

            if (estateConfig != null)
            {
                if (estateConfig.GetString("EstateCommunicationsHandler", Name) == Name)
                {
                    m_enabled = true;
                }
                else
                {
                    return;
                }

                port = (uint)estateConfig.GetInt("Port", 0);
                // this will need to came from somewhere else
                token = estateConfig.GetString("Token", token);
            }
            else
            {
                m_enabled = true;
            }

            m_EstateConnector = new EstateConnector(this, token, port);

            if (port == 0)
            {
                port = MainServer.Instance.Port;
            }

            // Instantiate the request handler
            IHttpServer server = MainServer.GetHttpServer(port);

            server.AddSimpleStreamHandler(new EstateSimpleRequestHandler(this, token));
        }