Beispiel #1
0
        ///
        /// <summary>Main for AsyncListener.</summary>
        /// <param name="args"></param>
        ///
        public static void Main(String[] args)
        {
            string uri = "tcp://localhost:4001";

            if (args.Length > 0)
            {
                uri = args[0];
            }

            MainAsyncListener implFactory = new MainAsyncListener();
            ServerFactory     listener    = AsyncHelper.NewListener(uri, null, implFactory);

            listener.TransportControl(TransportConsts.START_AND_WAIT_UP, 4000);
        }
Beispiel #2
0
        public void Setup()
        {
            //      MainAsyncListener.Main(new String[] { });

            String uri = "tcp://localhost:4010";

            MainAsyncListener implFactory = new MainAsyncListener();

            listener = AsyncHelper.NewListener(uri, null, implFactory);

            listener.TransportControl(TransportConsts.START_AND_WAIT_UP, 4000);

            MainAsyncClient client = new MainAsyncClient();

            server = AsyncHelper.NewServer(uri, null, client);


            server._StartAndWaitUp(4000);
        }