Exemplo n.º 1
0
        public void MakeConnection()
        {
            String uri = "tcp://127.0.0.1:4010";

            MainExampleClient client = new MainExampleClient();

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

            server._StartAndWaitUp(4000);
        }
Exemplo n.º 2
0
        ///<summary>Main for ExampleClient</summary>
        ///<param name="args">Command Line Arguments</param>
        public static void Main(String[] args)
        {
            // TODO: Change to correct URI
            string uri = "tcp://localhost:4002";

            RemoteExampleServer server = ExampleHelper.NewServer(uri, null, new MainExampleClient());

            // Connect to the service
            server._StartAndWaitUp(4000);

            // TODO: Insert Your Code Here

            // Disconnect from the service
            server._StopAndWaitDown(4000);
        }
Exemplo n.º 3
0
        ///<summary>Main for ExampleClient</summary>
        ///<param name="args">Command Line Arguments</param>
        public static void Main(String[] args)
        {
            // TODO: Change to correct URI
            string uri = "tcp://127.0.0.1:4001";

            RemoteExampleServer server = ExampleHelper.NewServer(uri, null, new MainExampleClient());

            // Connect to the service
            server._StartAndWaitUp(4000);

            // define result string
            string res = null;

            res = server.say_hello("Hello");
            Console.WriteLine(res);

            res = server.say_hello_mixin("Hello");
            Console.WriteLine(res);

            // Disconnect from the service
            server._StopAndWaitDown(4000);
        }
Exemplo n.º 4
0
 ///<summary>Return a new instance of ExampleClient.</summary>
 ///<param name="server">Reference to remote service</param>
 ///<returns>Client Implementation</returns>
 public ExampleClient NewExampleClient(RemoteExampleServer server)
 {
     return(new ImplExampleClient(server));
 }
Exemplo n.º 5
0
 /// <summary>Constructs the ImplExampleClient.</summary>
 /// <param name="server">a connection to the server session. Use this to
 /// send a message to the server.</param>
 public ImplExampleClient(RemoteExampleServer server)
 {
     this.server = server;
 }