Example #1
0
        public bool Navigate(IHtmlDataProvider html)
        {
            this.RegisterProtocols(html, true);
            bool flag = this.ShowHtml(html.Html);

            this.RegisterProtocols(html, false);
            return(flag);
        }
Example #2
0
 /// <summary>
 /// The constructor calls another method to handle the request, but can 
 /// optionally do so in a new thread.
 /// </summary>
 /// <param name="clientSocket"></param>
 /// <param name="asynchronously"></param>
 public ProcessClientRequest(Socket clientSocket, IHtmlDataProvider htmlDataProvider, Boolean asynchronously)
 {
     m_clientSocket = clientSocket;
     m_htmlDataProvider = htmlDataProvider;
     if (asynchronously)
         // Spawn a new thread to handle the request.
         new Thread(ProcessRequest).Start();
     else ProcessRequest();
 }
Example #3
0
 /// <summary>
 /// The constructor calls another method to handle the request, but can
 /// optionally do so in a new thread.
 /// </summary>
 /// <param name="clientSocket"></param>
 /// <param name="asynchronously"></param>
 public ProcessClientRequest(Socket clientSocket, IHtmlDataProvider htmlDataProvider, Boolean asynchronously)
 {
     m_clientSocket     = clientSocket;
     m_htmlDataProvider = htmlDataProvider;
     if (asynchronously)
     {
         // Spawn a new thread to handle the request.
         new Thread(ProcessRequest).Start();
     }
     else
     {
         ProcessRequest();
     }
 }
Example #4
0
 private void RegisterProtocols(IHtmlDataProvider html, bool register)
 {
     string[] protocols = html.Protocols;
     if (protocols != null)
     {
         for (int i = 0; i < protocols.Length; i++)
         {
             if (register)
             {
                 GenericProtocolManager.RegisterProtocol(protocols[i], html);
             }
             else
             {
                 GenericProtocolManager.UnRegisterProtocol(protocols[i]);
             }
         }
     }
 }
Example #5
0
 public SocketServer(IHtmlDataProvider htmlDataProvider)
 {
     new Thread(this.Run).Start();
     this.htmlDataProvider = htmlDataProvider;
 }
Example #6
0
 public SocketServer()
 {
     new Thread(this.Run).Start();
     htmlDataProvider = null;
 }
Example #7
0
 public SocketServer(IHtmlDataProvider htmlDataProvider)
 {
     new Thread(this.Run).Start();
     this.htmlDataProvider = htmlDataProvider;
 }
Example #8
0
 public  SocketServer()
 {
     new Thread(this.Run).Start();
     htmlDataProvider = null;
 }