StateChange Event
    
 

Description

Fires when wodXMPP changes its state.


Syntax

Private Sub object_StateChange(OldState)



The StateChange Event syntax has these parts:

Part Description
object A wodXMPP object.
OldState A StatesEnum enumeration, as described in settings. Constant value that represents some state.

Settings

The settings for OldState are:

Constant Value Description
 Disconnected 0 Disconnected from server.
 Connecting 1 Connecting to server.
 Registering 2 Registering new user.
 Encrypting 3 Initializing secure connection.
 LogonInProgress 4 Sending authentication data.
 Connected 5 Connected to server - idle.
 Receiving 6 Receiving data from server.
 Sending 7 Sending data to server.
 Executing 8 Executing command on server.
 Disconnecting 9 Disconnecting from the server.
 Resolving 10 Resolving the address and port of the server.

Remarks

StateChange event is fired each time wodXMPP internal state changes. Initially, it is set to Disconnected. Once you initiate new connection, it will change to Connecting, etc.. Using this event you can see if there is something happening with wodXMPP, or it is idle.

You can determine current state using State property.