Beispiel #1
0
		public static void SuiSnail(string[] args)
		{
			// The main task simply starts a client and a server, and then
			// waits for the client to signal that it has died:

			using (var context = new ZContext())
			using (var pubpipe = new ZActor(context, SuiSnail_Publisher))
			using (var subpipe = new ZActor(context, SuiSnail_Subscriber))
			{
				pubpipe.Start();
				subpipe.Start();

				subpipe.Frontend.ReceiveFrame();
				pubpipe.Frontend.Send(new ZFrame("break"));

				// wait for the Thread (you'll see how fast it is)
				pubpipe.Join(5000);
			}
		}