public void MakeConnection() { String uri = "tcp://localhost:4010"; MainHelloWorldClient client = new MainHelloWorldClient(); server = HelloWorldHelper.NewServer(uri, null, client); server._StartAndWaitUp(4000); }
///<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); }
///<summary>Return a new instance of HelloWorldClient.</summary> ///<param name="server">Reference to remote service</param> ///<returns>Client Implementation</returns> public HelloWorldClient NewHelloWorldClient(RemoteHelloWorldServer server) { return(new ImplHelloWorldClient(server)); }
/// <summary>Constructs the ImplHelloWorldClient.</summary> /// <param name="server">a connection to the server session. Use this to /// send a message to the server.</param> public ImplHelloWorldClient(RemoteHelloWorldServer server) { this.server = server; }