Back to product page

Pong callback method


Called when response to Ping arrives.

Syntax

  • Basic
object.Pong (Owner, Contact, ErrorCode, ErrorText)
The Pong(object,Owner,Contact,ErrorCode,ErrorText) syntax has these parts:
objectAn expression evaluating to an object of type IwodXMPPNotify
OwnerAn expression evaluating to an object of type wodXMPP
ContactXMPPContact object
ErrorCodeA Long value. Represents error number for error that occurred, if any.
ErrorTextA String value. Returns string representation of the error, if any.

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.

Called whenever wodXMPP receives ping back from the remote side. This will usually be caused because you 'pinged' server in order to check the connection state, but this can also occur if you pinged another contact. In that case, The notification method will also provide you with Contact parameter, which will reference to XMPPContact object. This will allow you to retrieve information about that Contact.

Many servers don't even implement Ping as a service of theirs. In that case ErrorCode will be set - but even that is good for you and can be considered as good in terms of connection being alive - you got *some* response, right?

Platforms

Windows