Example #1
0
        public Form1()
        {
            InitializeComponent();
            TcpChannel channel = new TcpChannel();

            ChannelServices.RegisterChannel(channel);
            client = (IHelloRemotingService.IHelloRemtingService)Activator.GetObject(
                typeof(IHelloRemotingService.IHelloRemtingService),
                "tcp://localhost:8085/GetMessage");
        }
Example #2
0
        static void Main(string[] args)
        {
            TcpChannel channel = new TcpChannel();

            ChannelServices.RegisterChannel(channel);
            client = (IHelloRemotingService.IHelloRemtingService)Activator.GetObject(
                typeof(IHelloRemotingService.IHelloRemtingService),
                "tcp://localhost:8080/GetMessage");
            Console.WriteLine(client.GetMessage("varuna"));
            Console.ReadLine();
        }