[Mono-devel-list] What should be done to use TcpChannel with Mono?

Nenad Lecek nenad_lecek at t-online.de
Sun Jul 31 13:47:35 EDT 2005


Dear all,

I just started with Mono, version 1.1.8 on WinXP with SP1 and failed to 
compile example bellow with following error:

mcs server.cs
server.cs(10) error CS0246: Cannot find type 'TcpChannel'

What should be done to use TcpChannel with Mono?
Or there is some other class with the same functionality?
Thanks.

Best regards
Nenad

File "server.cs":
------------------------------------------------------------------------
using System;
using System.Runtime.Remoting;
using System.Runtime.Remoting.Channels;
//using System.Runtime.Remoting.Channels.Tcp;

public class CoHello : MarshalByRefObject
{
    public static void Main()
    {
        TcpChannel channel = new TcpChannel(4000);
        ChannelServices.RegisterChannel(channel);
       
        RemotingConfiguration.RegisterWellKnownServiceType 
(typeof(CoHello), "HelloDotNet", WellKnownObjectMode.Singleton);
        System.Console.WriteLine("Hit <enter> to exit ...!");
        System.Console.ReadLine();
    }
   
    public void SayHallo()
    {
        Console.WriteLine("Hello, Universe of .Net and Mono");
    }
}
------------------------------------------------------------------------




-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20050731/0675a6f3/attachment.html 


More information about the Mono-devel-list mailing list