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

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

            MainAsyncClient   implFactory = new MainAsyncClient();
            RemoteAsyncServer server      = AsyncHelper.NewServer(uri, null, implFactory);

            server._TransportControl(TransportConsts.START_AND_WAIT_UP, 4000);

            // Insert Your Code Here
            //---------------------------------------------------------------------

            server._TransportControl(TransportConsts.STOP_AND_WAIT_DOWN, 4000);
        }
示例#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);
        }