Back to product page

UserConnected event

Fires when a user connects to the listening channel.


  • Basic
Private Sub object_UserConnected(Chan, User, ErrorCode, ErrorText)
The UserConnected(object,Chan,User,ErrorCode,ErrorText) syntax has these parts:
objectA wodTunnel object.
ChanA Channel object. Reference to the channel where the user connected.
UserAn User object. Reference to user that connected.
ErrorCodeAn Integer value. Specifies the error that occurred, if any.
ErrorTextA String value. Holds a text description of the error.


The UserConnected event is fired after you have allowed the User to connect and use the channel that they have chosen. From this point, they will be communicating with the destination service through the secure channel.

If the connection for the user fails (for whatever reason), the ErrorCode argument will hold one of the following nonzero values:

Code Description

0 No Error 1 Administratively prohibited 2 Connect failed 3 Unknown channel type 4 Resource shortage 5 Unknown error, or not specified

If the server provides a text description, it will be provided through the ErrorText argument.