Lluis,

Yes, interfaces do work now.  Good work!

Simple chat client however does not work.  Attached you see the exception
that is thrown, and all the source and binaries needed.  I hope this helps
tracking down the problem.  [Note this works on the MS.Net runtime, binaries
compiled with csc].

- URS C. MUFF

> -----Original Message-----
> From: Lluis Sanchez [mailto:[EMAIL PROTECTED]
> Sent: Monday, March 31, 2003 7:29 AM
> To: Urs Muff; [EMAIL PROTECTED]
> Subject: Re: [Mono-list] Remoting with interface definition
> 
> Remoting with interface definitionThis should work now.
> 
> ----- Original Message -----
> From: Urs Muff
> To: '[EMAIL PROTECTED]'
> Sent: Saturday, March 15, 2003 1:35 AM
> Subject: [Mono-list] Remoting with interface definition
> 
> 
> Using the following concept is not working on mono, but in the MS .Net
> framework:
> Common Lib:
> intercace IServerObj
> {
>         string Name { get; }
> }
> Client:
> main()
> {
>         ChannelServices.RegisterChannel(new TcpChannel(0));
> IServerObject server =
> Activation.GetObject(typeof(IServerObj),"tcp://localhost:8085/Test") as
> IServerObject;
> string name = server.Name;
> }
> Server:
> class ServerObject : MarshalByRefObject, IServerObject
> {
>         public string Name { get { return "Test Server"; } }
> }
> main()
> {
>         ChannelServices.RegisterChannel(new TcpChannel(8085));
> 
> RemotingConfiguration.RegisterWellKnownServiceType(typeof(HelloServer),"Te
> st
> ",WellKnownObjectMode.Singleton);
> }
> This is a very important concept, since it allows hiding the
> implementation
> from the Client.
> The crash is in corlib : Remoting.TypeInfo (since it assumes to be derived
> from object or MarshalByRefObject, which it is not, since it is a pure
> interface).  Fixing that does not help either since it crashes later than,
> since it still assumes it has to be a MarshalByRefObject (which it
> eventually should be since it will become a Proxy [right?]).  I'm not that
> familiar with the mono remoting implementation, but that seems like a
> design
> problem, unless I'm doing something wrong.
> - Urs C. Muff
> Systems Architect       - Research Lab

Attachment: Chat.tar.gz
Description: Binary data

Attachment: error.log
Description: Binary data

Reply via email to