Not logged in. · Lost password · Register
Forum: MatriX RSS
Avatar
gtko #1
Member since Oct 2013 · 4 posts
Group memberships: Members
Show profile · Link to this post
Subject: MatriX with unity3D, Openfire server
Hi everyone :)

I want to make a simple game using xmpp.
My environment is Unity3D(4.2), Openfire server(3.8.2).

So, I use Matrix for Mono. And I tried to connect the server with unity c# script.
But..... it's not working!!! No errors, no warnings, no results....
Other xmpp clients(adium, spark...) works very well with my openfire server.

Can I get some hints? Here is my codes:

  1. public class xmpp : MonoBehaviour {
  2.    
  3.     XmppClient _xmppClient = new XmppClient();
  4.    
  5.     // Use this for initialization
  6.     void Start () {
  7.         Debug.Log ("start");
  8.        
  9.         Connect ();
  10.  
  11.         Debug.Log ("open");
  12.     }
  13.    
  14.     // Update is called once per frame
  15.     void Update () {
  16.    
  17.     }
  18.    
  19.     void onLogin() {
  20.        
  21.     }
  22.    
  23.     public string Connect() {
  24.        try
  25.        {
  26.            _xmppClient.SetUsername("bwy1234");
  27.            _xmppClient.Password = "bwy1234";
  28.            _xmppClient.SetXmppDomain("irisneoze-pc");
  29.    
  30.            _xmppClient.Show = Matrix.Xmpp.Show.chat;
  31.            _xmppClient.AutoRoster = true;
  32.            _xmppClient.Open();
  33.    
  34.                     return "Connection Succesful";
  35.         }
  36.         catch (Exception ex)
  37.         {
  38.            Debug.Log(ex.ToString());
  39.            return "Could not Connect to Openfire Server";
  40.         }
  41.     }
  42. }
This post was edited on 2013-10-02, 10:19 by Alex.
Avatar
Alex #2
Member since Feb 2003 · 4322 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
The connect method is async. Which means that the call to Open returns immediately and MatriX is then in the state of establishing the connection.

Please add Xml logging as described here and post the output:
http://www.ag-software.net/matrix-xmpp-sdk/matrix-develope…
Avatar
zigglr #3
Member since May 2016 · 1 post
Group memberships: Members
Show profile · Link to this post
Quote by Alex on 2013-10-02, 10:22:
The connect method is async. Which means that the call to Open returns immediately and MatriX is then in the state of establishing the connection.

Please add Xml logging as described here and post the output:
http://www.ag-software.net/matrix-xmpp-sdk/matrix-develope…

We are interested in using matriX for the instant messaging feature of our chat app made in Unity3D. I just have a few questions if you don't mind:

1. Does matriX still work well with Unity3D? Can we use it on the free version
2. We currently store user details in a mySQL database, so can matriX be used alongside mySQL?

Thanks a lot!
Avatar
Alex #4
Member since Feb 2003 · 4322 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
MatriX works fine with Unity, you need the Mono edition.

Which DB backend you use on your XMPP server does not matter for MatriX.

Alex
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Forum: MatriX RSS