[Mono-dev] remoting on vista

Arkadiusz Kowal arkadiusz.kowal at gmail.com
Sat Jan 5 12:25:16 EST 2008


hello

i have a problem with remoting on vista:
i run this server code:

using System;
using System.Runtime.Remoting;
using System.Runtime.Remoting.Channels;
using System.Runtime.Remoting.Channels.Tcp;
using nsTest;

namespace nsServer
{
    public class Server
    {
        static void Main()
        {
            TcpChannel c = new TcpChannel(3200);
            ChannelServices.RegisterChannel(c);
            Type type = typeof(Test);
            RemotingConfiguration.RegisterWellKnownServiceType(type, 
"obiekt", WellKnownObjectMode.Singleton);
            Console.Read();
        }
    }


    public class Test : MarshalByRefObject, ITest
    {
        char[] table = new char[1000000];

        public Test()
        {
            ;
        }
        public void SendCharTable(char[] table)
        {
            this.table = table;
        }
    }
}

this client:
using System;
using System.Runtime.Remoting;
using System.Runtime.Remoting.Channels;
using System.Runtime.Remoting.Channels.Tcp;
using nsTest;

namespace nsClient
{
    public class Client
    {
        static void Main(string[] args)
        {
                TcpChannel c = new TcpChannel();
                ChannelServices.RegisterChannel(c, false);

                string url = "tcp://" + args[0] + ":3200/obiekt";
                Type type = typeof(ITest);

                object remoteObj = null;
                ITest test = null;
                remoteObj = Activator.GetObject(type, url);
                test = (ITest)remoteObj;

                char[] table = new char[50000];
                test.SendCharTable(table);
        }
    }
}

and this interface:
namespace nsTest
{
    public interface ITest
    {
         void SendCharTable(char[] table);
    }
}

I am testing it on vista, and when i am running server in .net sending 
table takes only short while (something about 1 second), but when i run 
server in mono i takes something about 15 seconds.

could somebody tell why it takes so long in mono?

thanks in advance
heretyk



More information about the Mono-devel-list mailing list