[Mono-list] Fw: [Jabber-Net] jabber-net on Mono 0.28 runtime, problems

Gaurav Vaish gvaish@adobe.com
Tue, 07 Oct 2003 12:31:58 +0530


FYI...
    Jabber on Mono!

    or am I too late to spread the words?

Cheers,
Gaurav
http://gvaish.virtualave.net
--------------------------------


----- Original Message ----- 
From: "Stephen Gutknecht (RoundSparrow)"
To: <jabber-net@jabberstudio.org>
Sent: Tuesday, October 07, 2003 00:16
Subject: [Jabber-Net] jabber-net on Mono 0.28 runtime, problems


> Hi,
>
> I did get jabber-net 0.07 to work on Mono 0.28 by hacking it up a bit.
My
> use is just a console application that doesn't use all of jabber-net
> features, so not sure if there are other issues.  Doing a basic connect I
> ran into two basic problems:
>
>
> 1.  bedrock\net\Address.cs method Resolve.  It seems the Async version of
> this method is working right on Mono?  So I changed it to use the non
> Async...
>   public void Resolve(AddressResolved callback)
>   {
>   if ((m_ip != null) && (m_ip != IPAddress.Any))
>   {
>   callback(this);
>   }
>   else
>   {
>   // Hack to work with Mono 0.28
>   //Dns.BeginResolve(m_hostname, new AsyncCallback(OnResolved), callback);
>   Resolve();
>   callback(this);
>   }
>   }
>
>
> 2. jabber\protocol\stream\Stream.cs Stream method.  The RNG functions of
> Mono 0.28 return errors, so I just hard coded some bytes in instead of
using
> random data....
>   public Stream(XmlDocument doc, string xmlns) :
>     base("stream", new XmlQualifiedName("stream",
> jabber.protocol.URI.STREAM), doc)
>   {
>   byte[] buf = new byte[4];
>   // Hack to work with Mono 0.28
>   //RNG.GetBytes(buf);
>   //ID = HexString(buf);
>   // Hard code a value:
>   ID = "abcd";
>   NS = xmlns;
>   }
>
>
> If you are interesting in compiling the code with mono, use a command
> similar to this:
>
> mcs --target library -recurse:C:\jabber-net\bedrock\*.cs
> -recurse:C:\jabber-net\jabber\*.cs -o C:\jabber-net-mono.dll
>
> Hope this is of some use to someone.
>
>   Stephen Gutknecht
>   currently in Redmond, Washington USA