public void MakeConnection() { String uri = "tcp://localhost:4010"; MainHelloWorldClient client = new MainHelloWorldClient(); server = HelloWorldHelper.NewServer(uri, null, client); server._StartAndWaitUp(4000); }
///<summary>Main for HelloWorldListener.</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"; ServerFactory listener = HelloWorldHelper.NewListener(uri, null, new MainHelloWorldListener()); // Start the Listener listener.TransportControl(TransportConsts.START_AND_WAIT_UP, 400000); }
public void StartListener() { String uri = "tcp://localhost:4010"; MainHelloWorldListener implFactory = new MainHelloWorldListener(); listener = HelloWorldHelper.NewListener(uri, null, implFactory); listener.TransportControl(TransportConsts.START_AND_WAIT_UP, 4000); Console.WriteLine("Listener Started"); }
///<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); }