Пример #1
0
        public void MakeConnection()
        {
            String uri = "tcp://localhost:4010";

            MainHelloWorldClient client = new MainHelloWorldClient();

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

            server._StartAndWaitUp(4000);
        }
Пример #2
0
        ///<summary>Main for HelloWorldClient</summary>
        ///<param name="args">Command Line Arguments</param>
        public static void Main(String[] args)
        {
            // TODO: Change to correct URI
            //string uri = "udp://127.0.0.1:4001";
            string uri = "tcp://127.0.0.1:4001";

            RemoteHelloWorldServer server = HelloWorldHelper.NewServer(uri, null, new MainHelloWorldClient());

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

            org.apache.etch.examples.helloworld.types.HelloWorld.user theUser = new user(5, "User");
            string s = server.say_hello(theUser);

            Console.Write(s);

            // Disconnect from the service
            server._StopAndWaitDown(4000);
        }