Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void ConnectToServer(string _serverName, string _username, string _password, string _nickName, int _port) {
- _serverName = "plords.m.in-app.io";
- _username = "test_plords_0";
- _password = "password_0";
- client = new XmppClient(_serverName);
- client.AutoRoster = false; //This can be used for the normal chat, not for notifications, it just retrieves the roster of users that you really do not care about
- client.AutoPresence = false;
- client.Transport = Matrix.Net.Transport.Socket;
- //int wsPort = 5280; //Temporary hardcoding until the solution is proven
- client.OnMessage += OnMessage;
- client.OnClose += OnClose;
- client.OnLogin += OnLogin;
- client.OnBind += OnBind;
- client.OnBindError += OnBindError;
- client.OnAuthError += OnAuthError;
- client.OnError += OnError;
- client.OnStreamError += OnStreamError;
- client.OnXmlError += OnXmlError;
- client.OnPresence += OnPresence;
- client.StartTls = false;
- client.KeepAliveInterval = 40;
- client.Username = _username;
- client.Password = _password;
- client.Uri = new Uri(String.Format("wss://plords.m.in-app.io:443/xmpp"));
- //client.Port = 5223;
- client.Open();
- nickName = _username;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement