StateChange Method
      
 

Description

Called when wodXMPP changes its state.


Return Type

None  


Syntax

object.StateChange Owner, OldState



The StateChange Method syntax has these parts:

Part Description
object An expression evaluating to an object of type IwodXMPPNotify.
Owner Required. A wodXMPP object.
OldState Required. A StatesEnum enumeration, as described in settings.

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.

Remarks

This method is called only if you implemented IwodXMPPNotify interface in your application, and wodXMPP.Notification property has received reference to instance of your implementation.

StateChange notification method is called 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 notification you can see if there is something happening with wodXMPP, or it is idle.

You can determine current state using State property.