Exemplo n.º 1
0
        public RemoteDebuggerService(RemoteDebuggerOptions options)
        {
            m_Options = options;

            if (options.HttpPort.HasValue)
            {
                Utf8TcpServerOptions httpopts = options.NetworkOptions & (~Network.Utf8TcpServerOptions.SingleClientOnly);
                m_HttpServer = new DebugWebHost(options.HttpPort.Value, httpopts);

                if (options.SingleScriptMode)
                {
                    m_HttpServer.RegisterResource("/", HttpResource.CreateText(HttpResourceType.Html,
                                                                               string.Format("<html><body><iframe height='100%' width='100%' src='Debugger?port={0}'>Please follow <a href='{0}'>link</a>.</iframe></body></html>", options.RpcPortBase)));
                }
                else
                {
                    m_JumpPage = m_HttpServer.GetJumpPageText();

                    m_HttpServer.RegisterResource("/", HttpResource.CreateCallback(GetJumpPageData));
                }

                m_HttpServer.Start();
            }

            m_RpcPortMax = options.RpcPortBase;
        }
Exemplo n.º 2
0
		public RemoteDebuggerService(RemoteDebuggerOptions options)
		{
			m_Options = options;

			if (options.HttpPort.HasValue)
			{
				Utf8TcpServerOptions httpopts = options.NetworkOptions & (~Network.Utf8TcpServerOptions.SingleClientOnly);
				m_HttpServer = new DebugWebHost(options.HttpPort.Value, httpopts);

				if (options.SingleScriptMode)
				{
					m_HttpServer.RegisterResource("/", HttpResource.CreateText(HttpResourceType.Html,
						string.Format("<html><body><iframe height='100%' width='100%' src='Debugger?port={0}'>Please follow <a href='{0}'>link</a>.</iframe></body></html>", options.RpcPortBase)));
				}
				else
				{
					m_JumpPage = m_HttpServer.GetJumpPageText();

					m_HttpServer.RegisterResource("/", HttpResource.CreateCallback(GetJumpPageData));
				}

				m_HttpServer.Start();
			}

			m_RpcPortMax = options.RpcPortBase;
		}