public void RaiseIncomingData(WebServerProvider sender, IncomingDataArguments args)
 {
     if (IncomingData != null)
     {
         IncomingData(sender, args);
     }
 }
		public void RaiseIncomingData(WebServerProvider sender, IncomingDataArguments args)
		{
			// jsc needs to take care of this on its own!
			// as we cannot call local event from an anonymous delegate it seems

			if (IncomingData != null)
				IncomingData(sender, args);
		}
        public void RaiseIncomingData(WebServerProvider sender, IncomingDataArguments args)
        {
            // jsc needs to take care of this on its own!
            // as we cannot call local event from an anonymous delegate it seems

            if (IncomingData != null)
            {
                IncomingData(sender, args);
            }
        }
Ejemplo n.º 4
0
        private void webServerComponent1_IncomingData(WebServerProvider sender, IncomingDataArguments a)
        {
            // we are probably on a wrong thread here

            // let the server know real fast what our log looks like
            // so thet he could send it to the client
            //this.History.AppendLine(a.PathAndQuery);
            //Console.WriteLine(a.PathAndQuery);

            a.PathAndQuery = a.PathAndQuery.Chop(outgoingMessages1.PathPrefix);

            // we need to caputre this
            var CurrentLocals = this.CurrentLocals;

            a.GetArguments().AsParametersTo(
                new sendname
            {
                BeforeInvoke =
                    e =>
                {
                    // somebody sent sendname
                }
            }.Invoke,

                new findname
            {
                BeforeInvoke =
                    e =>
                {
                    // somebody sent findname
                }
            }.Invoke,

                new asknames
            {
                BeforeInvoke =
                    e =>
                {
                    a.ContentType = "text/plain";



                    a.Content = CurrentLocals.ToJSON();
                }
            }.Invoke,

                new sendmessage
            {
                PrimaryThreadQueue = PrimaryThreadQueue,

                Display =
                    e =>
                {
                    // we should already be in the correct thread

                    AddTextMessageAndUpdate(e);
                }
            }.Invoke
                );

            a.SetLogText(History.ToString());

            //PrimaryThreadQueue.Enqueue(UpdateText);
        }
Ejemplo n.º 5
0
 private void webServerComponent1_Shutdown(WebServerProvider e)
 {
     Console.WriteLine("Shutdown: " + e.Port);
 }
Ejemplo n.º 6
0
 private void webServerComponent1_Start(WebServerProvider e)
 {
     Console.WriteLine("Start: " + e.Port);
 }
Ejemplo n.º 7
0
		private void webServerComponent1_IncomingData(WebServerProvider sender, IncomingDataArguments a)
		{
			// we are probably on a wrong thread here

			// let the server know real fast what our log looks like
			// so thet he could send it to the client
			//this.History.AppendLine(a.PathAndQuery);
			//Console.WriteLine(a.PathAndQuery);

			a.PathAndQuery = a.PathAndQuery.Chop(outgoingMessages1.PathPrefix);

			// we need to caputre this
			var CurrentLocals = this.CurrentLocals;

			a.GetArguments().AsParametersTo(
				new sendname
				{
					BeforeInvoke =
						e =>
						{
							// somebody sent sendname
						}
				}.Invoke,

				new findname
				{
					BeforeInvoke =
						e =>
						{
							// somebody sent findname
						}
				}.Invoke,

				new asknames
				{
					BeforeInvoke =
						e =>
						{
							a.ContentType = "text/plain";



							a.Content = CurrentLocals.ToJSON();
						}
				}.Invoke,

				new sendmessage
				{
					PrimaryThreadQueue = PrimaryThreadQueue,

					Display =
						e =>
						{
							// we should already be in the correct thread

							AddTextMessageAndUpdate(e);
						}
				}.Invoke
			);

			a.SetLogText(History.ToString());

			//PrimaryThreadQueue.Enqueue(UpdateText);
		}
Ejemplo n.º 8
0
		private void webServerComponent1_Shutdown(WebServerProvider e)
		{
			Console.WriteLine("Shutdown: " + e.Port);
		}
Ejemplo n.º 9
0
		private void webServerComponent1_Start(WebServerProvider e)
		{
			Console.WriteLine("Start: " + e.Port);
		}
		public void RaiseIncomingData(WebServerProvider sender, IncomingDataArguments args)
		{
			if (IncomingData != null)
				IncomingData(sender, args);
		}