Exemplo n.º 1
0
 static void Main(string[] args)
 {
     HelloRemotingService.HelloRemotingService remotingService = new HelloRemotingService.HelloRemotingService();
     TcpChannel channel = new TcpChannel(8080);
     ChannelServices.RegisterChannel(channel);
     RemotingConfiguration.RegisterWellKnownServiceType(typeof(HelloRemotingService.HelloRemotingService),
                                                        "GetMessage", WellKnownObjectMode.Singleton);
     Console.WriteLine("Remoting Service has started @" + DateTime.Now);
     Console.ReadLine();
 }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            HelloRemotingService.HelloRemotingService remotingService = new HelloRemotingService.HelloRemotingService();
            TcpChannel chanel = new TcpChannel(8080);

            ChannelServices.RegisterChannel(chanel);
            RemotingConfiguration.RegisterWellKnownServiceType(
                typeof(HelloRemotingService.HelloRemotingService), "GetMessage", WellKnownObjectMode.Singleton);
            Console.WriteLine("Remoting service started" + DateTime.Now);
            Console.ReadLine();
        }
Exemplo n.º 3
0
        static void Main()
        {
            HelloRemotingService.HelloRemotingService remotingService = new HelloRemotingService.HelloRemotingService();
            TcpChannel channel = new TcpChannel(8080);

            ChannelServices.RegisterChannel(channel);
            RemotingConfiguration.RegisterWellKnownServiceType
                (typeof(HelloRemotingService.HelloRemotingService), "Hello", WellKnownObjectMode.Singleton);
            Console.WriteLine("Remoting Service Started @ " + DateTime.Now);
            Console.WriteLine();
            Console.ReadKey();
        }
Exemplo n.º 4
0
        private static void Main(string[] args)
        {
            var remotingService = new HelloRemotingService.HelloRemotingService();
            var channel         = new TcpChannel(8081);

            ChannelServices.RegisterChannel(channel, false);
            RemotingConfiguration.RegisterWellKnownServiceType(
                typeof(HelloRemotingService.HelloRemotingService),
                "GetMessage",
                WellKnownObjectMode.Singleton);
            Console.WriteLine("Host started @ " + DateTime.Now);
            Console.WriteLine("Press ANY key to continue...");
            Console.ReadKey();
        }
Exemplo n.º 5
0
        static void Main()
        {
            HelloRemotingService.HelloRemotingService remotingService = new HelloRemotingService.HelloRemotingService();
            //Crear TCP Channel
            TcpChannel channel = new TcpChannel(8080);

            ChannelServices.RegisterChannel(channel);
            RemotingConfiguration.RegisterWellKnownServiceType(
                typeof(HelloRemotingService.HelloRemotingService),
                "GetMessage", WellKnownObjectMode.Singleton);
            Console.WriteLine("Servicio remoto iniciado @ " + DateTime.Now);
            Console.WriteLine("Presiona <ENTER> para salir!");
            Console.ReadLine();
        }
Exemplo n.º 6
0
        static void Main(string[] args)
        {
            int port = 45012;

            HelloRemotingService.HelloRemotingService service = new HelloRemotingService.HelloRemotingService();
            TcpChannel channel = new TcpChannel(port);

#pragma warning disable CS0618 // Type or member is obsolete
            ChannelServices.RegisterChannel(channel);
#pragma warning restore CS0618 // Type or member is obsolete
            RemotingConfiguration.RegisterWellKnownServiceType(typeof(HelloRemotingService.HelloRemotingService), "GetMessage", WellKnownObjectMode.Singleton);
            Console.WriteLine($"Remoting service started at {port}. URI: GetMessage");
            Console.WriteLine($"Press any key to stop...");
            Console.ReadKey();
        }
Exemplo n.º 7
0
        static void Main(string[] args)
        {
            //creating service instance
            HelloRemotingService.HelloRemotingService remotingService = new HelloRemotingService.HelloRemotingService();

            //create channel
            TcpChannel channel = new TcpChannel(8080);

            //register channel
#pragma warning disable 618
            ChannelServices.RegisterChannel(channel);
#pragma warning restore 618

            //config channel
            RemotingConfiguration.RegisterWellKnownServiceType(typeof(HelloRemotingService.HelloRemotingService), "GetMessage", WellKnownObjectMode.Singleton);

            Console.WriteLine("Host Started At " + DateTime.Now.ToString());
            Console.ReadLine();
        }