Exemplo n.º 1
0
        private static void TestServer()
        {
            Server s = new Server(new TestService(), Client.DefaultHeartbeat);

            s.Bind("tcp://127.0.0.1:1234");
            Console.WriteLine("Server started");
            s.Error += (sender, errorArgs) => { Console.WriteLine($"Error: {errorArgs.Info}"); };
            Console.Read();
            Console.WriteLine("Closing");
            s.Dispose();
        }
Exemplo n.º 2
0
        private static void Main(string[] args)
        {
            Server s = new Server(new SimpleWrapperService <TestObject>(new TestObject()));

            s.Bind("tcp://127.0.0.1:1234");
            Console.WriteLine("Server started");
            s.Error += (sender, errorArgs) => { Console.WriteLine($"Error: {errorArgs.Info}"); };
            Console.Read();
            Console.WriteLine("Closing");
            s.Dispose();
        }