void _jabberConnection_ErrorRaised(Enums.ErrorType type, string message) { Log.Error(String.Format("Jabber error: {0} {1}", type.ToString(), message)); switch (type) { case Enums.ErrorType.Authentification: Log.Error("Your jabber username or password is invalid"); break; case Enums.ErrorType.Server: Reconnect(); break; case Enums.ErrorType.Warning: case Enums.ErrorType.Query: //do nothing for now break; case Enums.ErrorType.Client: default: Close(); this._jabberConnection.Dispose(); this._jabberConnection = new nJim.Jabber(); Login(); break; } OnError(type, message); }
public Client() { this._jabberConnection = new nJim.Jabber(); }