xmpp
xmpp copied to clipboard
System.ObjectDisposedException
Hello,
when connect method is called, i have got a System.ObjectDisposedException.
Here is my code :
XMPP.Client client = new XMPP.Client();
client.Settings.Account = "payneauj@localhost";
client.Settings.Id = "payneauj@localhost";
client.Settings.Password = "test";
client.Settings.Hostname = "localhost";
client.Settings.Port = 5222;
client.Settings.SSL = false;
client.Settings.OldSSL = false;
client.Settings.AuthenticationTypes = MechanismType.None;
client.Settings.AuthenticationTypes |= MechanismType.DigestMD5;
client.Settings.AuthenticationTypes |= MechanismType.SCRAM;
client.Settings.UseKeepAlive = true;
//client.OnConnected += OnClientConnected;
//client.OnReceive += OnClientReceive;
//client.OnError += xmppClient_OnError;
//client.OnResourceBound += XmppClient_OnResourceBound;
client.Connect();
Do you have any idea?
Thanks
Do you have the stacktrace?
Hi I am getting the same issue.Below are the my code and I have also attach the screen shot for this.I am not found anny documentation also for this.
client.Settings.Hostname = "server ip address"; client.Settings.SSL = false; client.Settings.OldSSL = false; client.Settings.Port = 5222; client.Settings.Id = "sachin27@localhost"; client.Settings.Password = "qwerty";
client.Connect();
This bug occurs if you use the lib in an UWP project. Any chance that this gets fixed?
I did a little bit of research and found out that this issues origin is in Connection.cs in SocketConnect() like the following image shows:
I think it's related to following problem: http://stackoverflow.com/questions/13213258/windows-store-app-streamsoket-datareader-loadasync-objectdisposedexception (a null stream)
Unfortunately I do not have the Time to maintain this Code currently, I have last used it with Windows 8 and it possibly needs a few changes to make it run with UWP. That said I am happy to accept pull requests if somebody is willing to work things out. Apart from that there are a few forks that might be worh checking out and also the parent project from @coder2000 seems to have progressed in the recent years.