March 2018
Beginner to intermediate
410 pages
10h 40m
English
By using the OnStateChanged and OnConnectionError events, we have a simple mechanism with which we can follow the connection process. We also become aware of the Full JID of the connection, once the connection has become active and you're fully connected to the XMPP network:
private void StateChanged(object Sender, XmppState State)
{
Log.Informational("Changing state: " + State.ToString());
if (State == XmppState.Connected)
Log.Informational("Connected as " +
this.xmppClient.FullJID);
}
private void ConnectionError(object Sender, Exception ex)
{
Log.Error(ex.Message);
}
Read now
Unlock full access