[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mono-devel-list
Subject:    [Mono-devel-list] What should be done to use TcpChannel with Mono?
From:       Nenad Lecek <nenad_lecek () t-online ! de>
Date:       2005-07-31 17:47:35
Message-ID: 42ED0EB7.20109 () t-online ! de
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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");
    }
}
------------------------------------------------------------------------





[Attachment #5 (text/html)]

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Dear all,<br>
<br>
I just started with Mono, version 1.1.8 on WinXP with SP1 and failed to
compile example bellow with following error:<br>
<br>
mcs server.cs<br>
server.cs(10) error CS0246: Cannot find type 'TcpChannel'<br>
<br>
What should be done to use TcpChannel with Mono?<br>
Or there is some other class with the same functionality?<br>
Thanks.<br>
<br>
Best regards<br>
Nenad<br>
<br>
File "server.cs":<br>
<hr size="2" width="100%">using System;<br>
using System.Runtime.Remoting;<br>
using System.Runtime.Remoting.Channels;<br>
//using System.Runtime.Remoting.Channels.Tcp;<br>
<br>
public class CoHello : MarshalByRefObject<br>
{<br>
&nbsp;&nbsp;&nbsp; public static void Main()<br>
&nbsp;&nbsp;&nbsp; {<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; TcpChannel channel = new TcpChannel(4000);<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ChannelServices.RegisterChannel(channel);<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; RemotingConfiguration.RegisterWellKnownServiceType
(typeof(CoHello), "HelloDotNet", WellKnownObjectMode.Singleton);<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; System.Console.WriteLine("Hit &lt;enter&gt; to exit ...!");<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; System.Console.ReadLine();<br>
&nbsp;&nbsp;&nbsp; }<br>
&nbsp;&nbsp;&nbsp; <br>
&nbsp;&nbsp;&nbsp; public void SayHallo()<br>
&nbsp;&nbsp;&nbsp; {<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Console.WriteLine("Hello, Universe of .Net and Mono");<br>
&nbsp;&nbsp;&nbsp; }<br>
}<br>
<hr size="2" width="100%"><br>
<br>
<br>
<br>
</body>
</html>


_______________________________________________
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic