Beispiel #1
0
 ///
 /// <summary>Constructs the ImplAsyncClient.</summary>
 ///
 /// <param name=server></param>
 ///
 public ImplAsyncClient(RemoteAsyncServer server)
 {
     this.server            = server;
     _delegate_sync         = my_sync;
     _delegate_async_free   = my_async_free;
     _delegate_async_queued = my_async_queued;
 }
Beispiel #2
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);
        }
Beispiel #3
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);
        }
Beispiel #4
0
 ///
 /// <summary>Return a new instance of AsyncClient.</summary>
 /// @param server
 ///
 public AsyncClient NewAsyncClient(RemoteAsyncServer server)
 {
     return(new ImplAsyncClient(server));
 }