UserDisconnected Event
    
 

Description

Fires when user disconnects from the channel.

Syntax

Private Sub object_UserDisconnected(Chan, User, ErrorCode, ErrorText)

The UserDisconnected Event syntax has these parts:

PartDescription
objectA wodVPN object.
ChanA VPNChannel object. Reference to the wodVPNCom instance that called this notification method.
UserA VPNUser object. Reference to channel used.
ErrorCode A Long value. Error that occurred. 0 if none.
ErrorText A String value. Text description of the error.

Remarks

This event is fired when user leaves the channel. At this point he will be removed from the collection of all connected users, so this is last change to access information about the user.

If disconnection was result of an error, ErrorCode and ErrorText arguments will contain decription of the error.

Note that if UDP channel was used, UserDisconnected event may be result of user being idle for certain amount of seconds, depending on User.Timeout property value.