[IronPython] Remoting: Marshal object

Dino Viehland dinov at exchange.microsoft.com
Tue Jun 20 09:05:07 PDT 2006


I'm a little lost on this one - what is RemotingServerClient here?  Is it a type, an assembly, a namespace?

Also, do you get an exception, or does it just do nothing?

-----Original Message-----
From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Ralph Soons
Sent: Tuesday, June 20, 2006 8:04 AM
To: users at lists.ironpython.com
Subject: [IronPython] Remoting: Marshal object

I have a remoting problem again. I want to create an object at server side, as singleton so when a call is done at client side, ill get the already existing object. I tried it first with a c# server and client.

Can anyone tell me why the marshal function doesn't work, objects on server and client side are still different (same code works in c# application so configuration is correct):

Client side (Python):
t = RemotingServerClient.CallbackSink.Instance
System.Runtime.Remoting.RemotingServices.Marshal(t, 'TalkIsGoodToo')

Server side (c#):
CallbackSink.Instance.Send("Message");

Remotable object (c#):
public class CallbackSink : MarshalByRefObject
    {
        private static CallbackSink m_Instance = null;
        public event delCommsInfo OnHostToClient;

        public static CallbackSink Instance
        {
            get
            {
                if (null == m_Instance)
                {
                    m_Instance = new CallbackSink();
                }
                return m_Instance;
            }
        }

        private CallbackSink()
        { }

        public void Send(string message)
        {
            OnHostToClient(info);
        }
    }

Thanks for your help.
Best regards,
Ralph Soons

_________________________________________________________________
Talk with your online friends with MSN Messenger http://www.join.msn.com/messenger/overview

_______________________________________________
users mailing list
users at lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


More information about the users mailing list